[exim-dev] [Bug 1870] Use of ${run} in router conditions cau…

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: admin
Dátum:  
Címzett: exim-dev
Tárgy: [exim-dev] [Bug 1870] Use of ${run} in router conditions causes intermittent crash
https://bugs.exim.org/show_bug.cgi?id=1870

--- Comment #7 from Git Commit <git@???> ---
Git commit:
http://git.exim.org/exim.git/commitdiff/20fcb1e7be45177beca2d433f54260843cc7c2f6

commit 20fcb1e7be45177beca2d433f54260843cc7c2f6
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Thu Aug 11 20:22:37 2016 +0100
Commit:     Jeremy Harris <jgh146exb@???>
CommitDate: Thu Aug 11 20:44:10 2016 +0100


    Defensive coding in ${run }


    Bug 1870
---
 src/src/expand.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)


diff --git a/src/src/expand.c b/src/src/expand.c
index 9cdf28f..c13284d 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -3189,16 +3189,17 @@ items. */
 while (isspace(*s)) s++;
 if (*s == '}')
   {
-  if (type[0] == 'i')
-    {
-    if (yes) *yieldptr = string_catn(*yieldptr, sizeptr, ptrptr, US"true", 4);
-    }
-  else
-    {
-    if (yes && lookup_value)
-      *yieldptr = string_cat(*yieldptr, sizeptr, ptrptr, lookup_value);
-    lookup_value = save_lookup;
-    }
+  if (!skipping)
+    if (type[0] == 'i')
+      {
+      if (yes) *yieldptr = string_catn(*yieldptr, sizeptr, ptrptr, US"true",
4);
+      }
+    else
+      {
+      if (yes && lookup_value)
+    *yieldptr = string_cat(*yieldptr, sizeptr, ptrptr, lookup_value);
+      lookup_value = save_lookup;
+      }
   s++;
   goto RETURN;
   }
@@ -4959,7 +4960,10 @@ while (*s != 0)
     }


       if (skipping)   /* Just pretend it worked when we're skipping */
+    {
         runrc = 0;
+    lookup_value = NULL;
+    }
       else
         {
         if (!transport_set_up_command(&argv,    /* anchor for arg list */


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