[exim-cvs] Hintsdb: fix dumpdb for sqlite

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Exim Git Commits Mailing List
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] Hintsdb: fix dumpdb for sqlite
Gitweb: https://git.exim.org/exim.git/commitdiff/f3fe5970b320bd6f8c9d01f11881fa6d6b5e7384
Commit:     f3fe5970b320bd6f8c9d01f11881fa6d6b5e7384
Parent:     6a301092490e702fbb5c55de3eb2cfa5ee924802
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Fri Jun 28 14:01:54 2024 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Fri Jun 28 14:01:54 2024 +0100


    Hintsdb: fix dumpdb for sqlite
---
 src/src/hintsdb.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


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);

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/