X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Fstring.c;h=0f657dccaebb16499a5e40f57ce656fb2977a1b7;hb=e5cccda9bbf169ea7dc97fa3859735523dd4cec0;hp=365eaec030869f23c42397075ced444ff49b50ad;hpb=44649fdb169979af3c5a08b10889d1ecee48a469;p=exim.git diff --git a/src/src/string.c b/src/src/string.c index 365eaec03..0f657dcca 100644 --- a/src/src/string.c +++ b/src/src/string.c @@ -304,7 +304,7 @@ if (nonprintcount == 0) return s; /* Get a new block of store guaranteed big enough to hold the expanded string. */ -ss = store_get(length + nonprintcount * 4 + 1); +ss = store_get(length + nonprintcount * 3 + 1); /* Copy everying, escaping non printers. */ @@ -717,7 +717,8 @@ uschar buffer[STRING_SPRINTF_BUFFER_SIZE]; va_start(ap, format); if (!string_vformat(buffer, sizeof(buffer), format, ap)) log_write(0, LOG_MAIN|LOG_PANIC_DIE, - "string_sprintf expansion was longer than " SIZE_T_FMT, sizeof(buffer)); + "string_sprintf expansion was longer than " SIZE_T_FMT " (%s)", + sizeof(buffer), format); va_end(ap); return string_copy(buffer); } @@ -997,7 +998,7 @@ if (list) new = string_cat(new, &sz, &off, &sep, 1); } -while (sp = Ustrchr(ele, sep)) +while((sp = Ustrchr(ele, sep))) { new = string_cat(new, &sz, &off, ele, sp-ele+1); new = string_cat(new, &sz, &off, &sep, 1);