From: Jeremy Harris Date: Fri, 28 Jun 2024 13:01:54 +0000 (+0100) Subject: Hintsdb: fix dumpdb for sqlite X-Git-Tag: exim-4.98-RC3~5 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/f3fe5970b320bd6f8c9d01f11881fa6d6b5e7384?ds=sidebyside;hp=6a301092490e702fbb5c55de3eb2cfa5ee924802 Hintsdb: fix dumpdb for sqlite --- diff --git a/src/src/hintsdb.h b/src/src/hintsdb.h index c5a856abc..3fedfabca 100644 --- a/src/src/hintsdb.h +++ b/src/src/hintsdb.h @@ -292,8 +292,8 @@ int i; BOOL ret; # ifdef COMPILE_UTILITY -qry = malloc((i = snprintf(NULL, 0, FMT, *cursor))); -snprintf(CS qry, i-1, FMT, *cursor); +if (!(qry = malloc((i = snprintf(NULL, 0, FMT, *cursor))+1))) return FALSE; +snprintf(CS qry, i, FMT, *cursor); /* fprintf(stderr, "exim_dbscan(%s)\n", qry); */ ret = exim_dbget__(dbp, qry, key); free(qry);