diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2008-09-29 17:39:38 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-09-29 17:39:38 +0000 |
| commit | 7be4f882fe27f2a879f4fe83663e5e33fa1f9c77 (patch) | |
| tree | c04c0cf173aaa7cb4381c4310a8bdffb67662e59 | |
| parent | 25771: shell function context for substitution functions (diff) | |
| download | zsh-7be4f882fe27f2a879f4fe83663e5e33fa1f9c77.tar zsh-7be4f882fe27f2a879f4fe83663e5e33fa1f9c77.tar.gz zsh-7be4f882fe27f2a879f4fe83663e5e33fa1f9c77.tar.bz2 zsh-7be4f882fe27f2a879f4fe83663e5e33fa1f9c77.tar.lz zsh-7be4f882fe27f2a879f4fe83663e5e33fa1f9c77.tar.xz zsh-7be4f882fe27f2a879f4fe83663e5e33fa1f9c77.tar.zst zsh-7be4f882fe27f2a879f4fe83663e5e33fa1f9c77.zip | |
25772: crash with bad associative array pattern search
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | Src/params.c | 2 |
2 files changed, 6 insertions, 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. 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) |
