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 <herb...@gondor.apana.org.au>

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;
        if (subtype != VSNORMAL) {      /* skip to end of alternative */
                int nesting = 1;
Email: Herbert Xu <herb...@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to