[exim-cvs] SRS: fix encode for local-part with zero-length q…

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Exim Git Commits Mailing List
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] SRS: fix encode for local-part with zero-length quoted element. Bug 3087
Gitweb: https://git.exim.org/exim.git/commitdiff/86e5b23559e50f107620aefeb52f4a856f988421
Commit:     86e5b23559e50f107620aefeb52f4a856f988421
Parent:     9ae8613607b12257e1fe59c603119bc5d4cd3474
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Fri Apr 5 11:27:10 2024 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Fri Apr 5 11:27:10 2024 +0100


    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


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/