From: Jeremy Harris Date: Thu, 11 Aug 2016 19:22:37 +0000 (+0100) Subject: Defensive coding in ${run } X-Git-Tag: exim-4_88_RC1~37 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=20fcb1e7be45177beca2d433f54260843cc7c2f6;p=user%2Fhenk%2Fcode%2Fexim.git Defensive coding in ${run } Bug 1870 --- diff --git a/src/src/expand.c b/src/src/expand.c index 9cdf28fc1..c13284d8e 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 */