mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-10 12:40:58 +02:00
32001: fix crash on ${:*} and ${:|}
This commit is contained in:
parent
412eb07885
commit
bd919f30ae
3 changed files with 22 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-11-17 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||||
|
|
||||||
|
* 32001: Src/subst.: fix crash on empty arrays with array
|
||||||
|
intersection and disjunction.
|
||||||
|
|
||||||
2013-11-15 Barton E. Schaefer <schaefer@zsh.org>
|
2013-11-15 Barton E. Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
* Martin Vaeth: 31988: Doc/Makefile.in, Util/helpfiles: remove
|
* Martin Vaeth: 31988: Doc/Makefile.in, Util/helpfiles: remove
|
||||||
|
|
|
@ -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. */
|
} else { /* no ${...=...} or anything, but possible modifiers. */
|
||||||
/*
|
/*
|
||||||
* Handler ${+...}. TODO: strange, why do we handle this only
|
* Handler ${+...}. TODO: strange, why do we handle this only
|
||||||
|
|
|
@ -1551,3 +1551,12 @@
|
||||||
0:Empty parameter shouldn't cause modifiers to crash the shell
|
0:Empty parameter shouldn't cause modifiers to crash the shell
|
||||||
>
|
>
|
||||||
>
|
>
|
||||||
|
|
||||||
|
# This used to cause uncontrolled behaviour, but at best
|
||||||
|
# you got the wrong output so the check is worth it.
|
||||||
|
args() { print $#; }
|
||||||
|
args ${:*}
|
||||||
|
args ${:|}
|
||||||
|
0:Intersection and disjunction with empty parameters
|
||||||
|
>0
|
||||||
|
>0
|
||||||
|
|
Loading…
Reference in a new issue