[exim-cvs] A safer version of the check for gecos expansion.

Pàgina inicial
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
A: exim-cvs
Assumpte: [exim-cvs] A safer version of the check for gecos expansion.
Gitweb: http://git.exim.org/exim.git/commitdiff/e0fccd1ddccf02568e9f8e6af38e62513f306fe5
Commit:     e0fccd1ddccf02568e9f8e6af38e62513f306fe5
Parent:     5922c78c4b1f8f8c2b4ceede15470ae59f4b2da7
Author:     Tony Finch <dot@???>
AuthorDate: Fri Dec 7 11:52:09 2012 +0000
Committer:  Tony Finch <dot@???>
CommitDate: Fri Dec 7 11:52:09 2012 +0000


    A safer version of the check for gecos expansion.
---
 src/src/receive.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/src/src/receive.c b/src/src/receive.c
index eef0531..efd0766 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -2039,8 +2039,8 @@ for (h = header_list->next; h != NULL; h = h->next)
         uschar *s = Ustrchr(h->text, ':') + 1;
         while (isspace(*s)) s++;
         len = h->slen - (s - h->text) - 1;
-        if (strncmpic(s, originator_login, len) == 0
-            && Ustrlen(originator_login) == len)
+        if (Ustrlen(originator_login) == len &&
+        strncmpic(s, originator_login, len) == 0)
           {
           uschar *name = is_resent? US"Resent-From" : US"From";
           header_add(htype_from, "%s: %s <%s@%s>\n", name, originator_name,