diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2002-06-02 18:03:20 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2002-06-02 18:03:20 +0000 |
commit | da6a201946da68c47e7a20068ca48c9b9b2b7a9a (patch) | |
tree | 260d3cd69fa798035d4720cce801e16a90812b49 | |
parent | 5441412544b4175cd19cd2848360a3f0dee9ed8e (diff) | |
download | zsh-da6a201946da68c47e7a20068ca48c9b9b2b7a9a.tar.gz zsh-da6a201946da68c47e7a20068ca48c9b9b2b7a9a.tar.xz zsh-da6a201946da68c47e7a20068ca48c9b9b2b7a9a.zip |
17272: inner function definition could define nonsense
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Src/parse.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index c3baf6c5b..68acea586 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-06-02 Peter Stephenson <pws@pwstephenson.fsnet.co.uk> + + * 17272: Src/parse.c: `outer() { inner(); }' succeded; when outer + ran it created a bogus `inner' which crashed the shell. Make + original command issue error. + 2002-05-31 Clint Adams <clint@zsh.org> * 17266: Completion/Unix/Command/_man: check `manpath` diff --git a/Src/parse.c b/Src/parse.c index 5d78881c5..cb731736b 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -1590,6 +1590,8 @@ par_simple(int *complex, int nr) pl = ecadd(WCB_PIPE(WC_PIPE_END, 0)); par_cmd(&c); + if (!c) + YYERROR(oecused); set_sublist_code(sl, WC_SUBLIST_END, 0, ecused - 1 - sl, c); set_list_code(ll, (Z_SYNC | Z_END), c); |