diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2013-11-17 20:33:57 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2013-11-17 20:33:57 +0000 |
commit | bd919f30aeb45828404899a1524b2028446860bd (patch) | |
tree | 13e320dfae6a9a2334cfc041198700aa671123b1 /Src/subst.c | |
parent | 412eb078850e2d5213048052e40215322e3949c8 (diff) | |
download | zsh-bd919f30aeb45828404899a1524b2028446860bd.tar.gz zsh-bd919f30aeb45828404899a1524b2028446860bd.tar.xz zsh-bd919f30aeb45828404899a1524b2028446860bd.zip |
32001: fix crash on ${:*} and ${:|}
Diffstat (limited to 'Src/subst.c')
-rw-r--r-- | Src/subst.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Src/subst.c b/Src/subst.c index a4df2567f..1059508ef 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -2941,6 +2941,14 @@ paramsubst(LinkList l, LinkNode n, char **str, int qt, int pf_flags) } } } + if (vunset) { + if (unset(UNSET)) { + *idend = '\0'; + zerr("%s: parameter not set", idbeg); + return NULL; + } + val = dupstring(""); + } } else { /* no ${...=...} or anything, but possible modifiers. */ /* * Handler ${+...}. TODO: strange, why do we handle this only |