From: Jeremy Harris Date: Fri, 5 Apr 2024 10:27:10 +0000 (+0100) Subject: SRS: fix encode for local-part with zero-length quoted element. Bug 3087 X-Git-Tag: exim-4.98-RC0~45 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/86e5b23559e50f107620aefeb52f4a856f988421 SRS: fix encode for local-part with zero-length quoted element. Bug 3087 --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 65da3cead..e7f70713d 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -145,6 +145,9 @@ JH/28 Bug 3086: Fix exinext for ipv6. Change the format of keys in the retry "host addresses" in square-brackets. This makes the parsing that exinext does more reliable. +JH/29 Bug 3087: Fix SRS encode. A zero-length quoted element in the local-part + would cause a crash. + Exim version 4.97 ----------------- diff --git a/src/src/expand.c b/src/src/expand.c index 5ea4dc6d4..1d121756d 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -7117,7 +7117,7 @@ while (*s) gstring_release_unused(h); s = string_from_gstring(h); } - g = string_cat(g, s); + if (s) g = string_cat(g, s); } /* Assume that if the original local_part had quotes