X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/c1fb74d63ecf0cd1501e53352419bfdfd154b7ea..f9d167e054b6c63fb114cf96d1f0269f0bfbcefb:/src/src/transport.c diff --git a/src/src/transport.c b/src/src/transport.c index 89252ec7a..3d86919de 100644 --- a/src/src/transport.c +++ b/src/src/transport.c @@ -959,11 +959,10 @@ if (!(tctx->options & topt_no_headers)) if (tctx->options & topt_add_return_path) { - uschar buffer[EXIM_EMAILADDR_MAX + 20]; - int n = string_format(CS buffer, sizeof(buffer), - "Return-path: <%.*s>\n", - EXIM_EMAILADDR_MAX, return_path); - if (!write_chunk(tctx, buffer, n)) goto bad; + int n; + uschar * s = string_sprintf("Return-path: <%.*s>\n%n", + EXIM_EMAILADDR_MAX, return_path, &n); + if (!write_chunk(tctx, s, n)) goto bad; } /* Add envelope-to: if requested */