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
(parent:
fb911b2
)
Make printf of gstring null-safe
author
Jeremy Harris
<jgh146exb@wizmail.org>
Fri, 11 Aug 2023 12:24:57 +0000
(13:24 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Fri, 11 Aug 2023 12:24:57 +0000
(13:24 +0100)
Broken-by: 00392be0e7cf
src/src/string.c
patch
|
blob
|
history
diff --git
a/src/src/string.c
b/src/src/string.c
index 854cf0d34b6e73915ada64173114067dbea601b8..52b1d2fb5895ccda12006d34d0b38d71049bbd34 100644
(file)
--- a/
src/src/string.c
+++ b/
src/src/string.c
@@
-1579,8
+1579,8
@@
while (*fp)
case 'Y': /* gstring pointer */
{
gstring * zg = va_arg(ap, gstring *);
- s = CS zg->s;
- slen = zg->ptr;
+ if (zg) { s = CS zg->s; slen = zg->ptr; }
+ else { s = null; slen = Ustrlen(s); }
goto INSERT_GSTRING;
}