mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-29 06:51:03 +02:00
25772: crash with bad associative array pattern search
This commit is contained in:
parent
28cf4041b4
commit
7be4f882fe
2 changed files with 6 additions and 0 deletions
|
@ -1,5 +1,9 @@
|
|||
2008-09-29 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 25772: Src/params.c: searching an associative array with
|
||||
a bad pattern could cause a crash, seen in _expand following
|
||||
"echo ~[]".
|
||||
|
||||
* 25771: Src/utils.c, Src/zsh.h: shell function context
|
||||
for substitution functions.
|
||||
|
||||
|
|
|
@ -1302,6 +1302,8 @@ getarg(char **str, int *inv, Value v, int a2, zlong *w,
|
|||
|
||||
if (v->isarr) {
|
||||
if (ishash) {
|
||||
if (!pprog)
|
||||
return 1;
|
||||
scanprog = pprog;
|
||||
scanstr = s;
|
||||
if (keymatch)
|
||||
|
|
Loading…
Reference in a new issue