diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-01-18 22:38:57 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-01-18 22:38:57 +0000 |
commit | c6c9f5daf2e196e6ab7346dfbf5f5166a1d87f0c (patch) | |
tree | de064fa6ba629549d42868b7016dd3c28bfb0e34 /Src/params.c | |
parent | 6856ab39e32e0cba96fcdae004878938125890ac (diff) | |
download | zsh-c6c9f5daf2e196e6ab7346dfbf5f5166a1d87f0c.tar.gz zsh-c6c9f5daf2e196e6ab7346dfbf5f5166a1d87f0c.tar.xz zsh-c6c9f5daf2e196e6ab7346dfbf5f5166a1d87f0c.zip |
34322: bug with interface to parsestr() etc.
Was showing up in places like ${(e)...} where command substitution could reallocate the token string, but actually there was never any guarantee that the lexer wouldn't do that, so this was always a bit iffy.
Diffstat (limited to 'Src/params.c')
-rw-r--r-- | Src/params.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/params.c b/Src/params.c index b8e0c429b..64c78bd63 100644 --- a/Src/params.c +++ b/Src/params.c @@ -1260,7 +1260,8 @@ getarg(char **str, int *inv, Value v, int a2, zlong *w, if (ishash && (keymatch || !rev)) remnulargs(s); if (needtok) { - if (parsestr(s)) + s = dupstring(s); + if (parsestr(&s)) return 0; singsub(&s); } else if (rev) |