git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Recast more internal string routines to use growable-strings
[exim.git]
/
src
/
src
/
header.c
diff --git
a/src/src/header.c
b/src/src/header.c
index 51aa9f953e6f4638300107b5d9f8e53df1fd34df..74df32ca1decb2c7f52f9420910b2d5eb44a4a6c 100644
(file)
--- a/
src/src/header.c
+++ b/
src/src/header.c
@@
-98,12
+98,14
@@
header_line **hptr;
uschar *p, *q;
uschar buffer[HEADER_ADD_BUFFER_SIZE];
uschar *p, *q;
uschar buffer[HEADER_ADD_BUFFER_SIZE];
+gstring gs = { .size = HEADER_ADD_BUFFER_SIZE, .ptr = 0, .s = buffer };
if (!header_last) return;
if (!header_last) return;
-if (!string_vformat(
buffer, sizeof(buffer)
, format, ap))
+if (!string_vformat(
&gs, FALSE
, format, ap))
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "string too long in header_add: "
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "string too long in header_add: "
- "%.100s ...", buffer);
+ "%.100s ...", string_from_gstring(&gs));
+string_from_gstring(&gs);
/* Find where to insert this header */
/* Find where to insert this header */