mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-06 09:01:13 +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>
|
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
|
* 25771: Src/utils.c, Src/zsh.h: shell function context
|
||||||
for substitution functions.
|
for substitution functions.
|
||||||
|
|
||||||
|
|
|
@ -1302,6 +1302,8 @@ getarg(char **str, int *inv, Value v, int a2, zlong *w,
|
||||||
|
|
||||||
if (v->isarr) {
|
if (v->isarr) {
|
||||||
if (ishash) {
|
if (ishash) {
|
||||||
|
if (!pprog)
|
||||||
|
return 1;
|
||||||
scanprog = pprog;
|
scanprog = pprog;
|
||||||
scanstr = s;
|
scanstr = s;
|
||||||
if (keymatch)
|
if (keymatch)
|
||||||
|
|
Loading…
Reference in a new issue