Message ID | 20180528090948.4ootvfsm4qqt3klk@gondor.apana.org.au (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
diff --git a/src/expand.c b/src/expand.c index a8bc142..f9ab160 100644 --- a/src/expand.c +++ b/src/expand.c @@ -810,6 +810,8 @@ record: goto record; } + varlen = 0; + end: if (subtype != VSNORMAL) { /* skip to end of alternative */ int nesting = 1;
When we are trimming an unset variable in evalvar, any embedded command substitution that should have been skipped are not. This can cause them to be evaluated later should there be other command substitutions in the same input word. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>