From 86e5b23559e50f107620aefeb52f4a856f988421 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Fri, 5 Apr 2024 11:27:10 +0100 Subject: [PATCH] SRS: fix encode for local-part with zero-length quoted element. Bug 3087 --- doc/doc-txt/ChangeLog | 3 +++ src/src/expand.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 -- 2.30.2