git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
c1ee83e
)
Hintsdb: fix dumpdb for sqlite
author
Jeremy Harris
<jgh146exb@wizmail.org>
Fri, 28 Jun 2024 12:57:02 +0000
(13:57 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Fri, 28 Jun 2024 13:02:52 +0000
(14:02 +0100)
src/src/hintsdb/hints_sqlite.h
patch
|
blob
|
history
diff --git
a/src/src/hintsdb/hints_sqlite.h
b/src/src/hintsdb/hints_sqlite.h
index 70efbf767b1705585636bb0b9a179633cd036d6c..21ebd4f01351dbb76d0f4731b2fd5ada7d051359 100644
(file)
--- 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);