[exim-dev] [Bug 1639] segfault in route_address

Página Inicial
Delete this message
Reply to this message
Autor: admin
Data:  
Para: exim-dev
Assunto: [exim-dev] [Bug 1639] segfault in route_address
https://bugs.exim.org/show_bug.cgi?id=1639

Git Commit <git@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |git@???


--- Comment #2 from Git Commit <git@???> ---
Git commit:
http://git.exim.org/exim.git/commitdiff/a818f67959c0f6dd23ca37280d5c4f9b9ee07125

commit a818f67959c0f6dd23ca37280d5c4f9b9ee07125
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Fri Jun 5 15:30:33 2015 +0100
Commit:     Jeremy Harris <jgh146exb@???>
CommitDate: Fri Jun 5 15:30:33 2015 +0100


    Guard routing against a null-deref.  Bug 1639
---
 src/src/route.c | 31 +++++++++++++++----------------
 1 file changed, 15 insertions(+), 16 deletions(-)


diff --git a/src/src/route.c b/src/src/route.c
index cdfa6e6..39aed90 100644
--- a/src/src/route.c
+++ b/src/src/route.c
@@ -1920,24 +1920,23 @@ if (unseen && r->next != NULL)
/* Unset the address expansions, and return the final result. */

 ROUTE_EXIT:
-if (yield == DEFER) {
-  if (
-    ((Ustrstr(addr->message, "failed to expand") != NULL) ||
(Ustrstr(addr->message, "expansion of ") != NULL)) &&
-    (
-      Ustrstr(addr->message, "mysql") != NULL ||
-      Ustrstr(addr->message, "pgsql") != NULL ||
+if (  yield == DEFER
+   && addr->message
+   && (  Ustrstr(addr->message, "failed to expand") != NULL
+      || Ustrstr(addr->message, "expansion of ") != NULL
+      )
+   && (  Ustrstr(addr->message, "mysql") != NULL
+      || Ustrstr(addr->message, "pgsql") != NULL
 #ifdef EXPERIMENTAL_REDIS
-      Ustrstr(addr->message, "redis") != NULL ||
+      || Ustrstr(addr->message, "redis") != NULL
 #endif
-      Ustrstr(addr->message, "sqlite") != NULL ||
-      Ustrstr(addr->message, "ldap:") != NULL ||
-      Ustrstr(addr->message, "ldapdn:") != NULL ||
-      Ustrstr(addr->message, "ldapm:") != NULL
-    )
-  ) {
-    addr->message = string_sprintf("Temporary internal error");
-  }
-}
+      || Ustrstr(addr->message, "sqlite") != NULL
+      || Ustrstr(addr->message, "ldap:") != NULL
+      || Ustrstr(addr->message, "ldapdn:") != NULL
+      || Ustrstr(addr->message, "ldapm:") != NULL
+      )
+   )
+  addr->message = string_sprintf("Temporary internal error");


deliver_set_expansions(NULL);
router_name = NULL;

--
You are receiving this mail because:
You are on the CC list for the bug.