diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Src/params.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 81274d81b..e1f7a96b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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. diff --git a/Src/params.c b/Src/params.c index 58927f1c0..379d90729 100644 --- a/Src/params.c +++ b/Src/params.c @@ -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) |