[exim-cvs] Avoid leaving $domain live with bogus info, duri…

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Exim Git Commits Mailing List
Date:  
À: exim-cvs
Sujet: [exim-cvs] Avoid leaving $domain live with bogus info, during server connection startup
Gitweb: https://git.exim.org/exim.git/commitdiff/cde93db00d4f5cff864070ebfed2d0c36e532e71
Commit:     cde93db00d4f5cff864070ebfed2d0c36e532e71
Parent:     bebeeb502c5bbdd5e91e073a04dc84b6434d6566
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Fri Nov 23 23:55:36 2018 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sat Nov 24 00:52:14 2018 +0000


    Avoid leaving $domain live with bogus info, during server connection startup


    Recent efforts to reduce string-copy ops while also avoiding using excessive memory
    tripped a check on freeing the still-live variable.  It is unclear why the variable
    was set anyway, even though commented.  The use was introduced between Exim 3.36 and 4.0
---
 src/src/smtp_in.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)


diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index e9e8177..af2cdb2 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -4169,9 +4169,8 @@ while (done <= 0)
     because otherwise the log can be confusing. */


     if (  !sender_host_name
-       && (deliver_domain = sender_helo_name,  /* set $domain */
-           match_isinlist(sender_helo_name, CUSS &helo_lookup_domains, 0,
-        &domainlist_anchor, NULL, MCL_DOMAIN, TRUE, NULL)) == OK)
+       && match_isinlist(sender_helo_name, CUSS &helo_lookup_domains, 0,
+        &domainlist_anchor, NULL, MCL_DOMAIN, TRUE, NULL) == OK)
       (void)host_name_lookup();


     /* Rebuild the fullhost info to include the HELO name (and the real name