From 459315d9e400695d3cf6e256e579f7e41e6533b3 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 28 Jun 2024 13:57:02 +0100 Subject: [PATCH] Hintsdb: fix dumpdb for sqlite --- src/src/hintsdb/hints_sqlite.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/src/hintsdb/hints_sqlite.h b/src/src/hintsdb/hints_sqlite.h index 70efbf767..21ebd4f01 100644 --- a/src/src/hintsdb/hints_sqlite.h +++ b/src/src/hintsdb/hints_sqlite.h @@ -246,8 +246,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); -- 2.30.2