Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: Syntax error on "function ..." causes crash
- X-seq: zsh-workers 12710
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: Re: Syntax error on "function ..." causes crash
- Date: Mon, 28 Aug 2000 09:03:12 +0200 (MET DST)
- In-reply-to: "Bart Schaefer"'s message of Sun, 27 Aug 2000 16:50:52 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Bart Schaefer wrote:
> zagzig% function
> function> :
>
> Program received signal SIGSEGV, Segmentation fault.
This makes it be silent, as in 3.0.8.
Bye
Sven
Index: Src/exec.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/exec.c,v
retrieving revision 1.17
diff -u -r1.17 exec.c
--- Src/exec.c 2000/08/08 14:57:03 1.17
+++ Src/exec.c 2000/08/28 07:02:34
@@ -3070,7 +3070,10 @@
LinkList names;
end = beg + WC_FUNCDEF_SKIP(state->pc[-1]);
- names = ecgetlist(state, *state->pc++, EC_DUPTOK, &htok);
+ if (!(names = ecgetlist(state, *state->pc++, EC_DUPTOK, &htok))) {
+ state->pc = end;
+ return 0;
+ }
nprg = end - beg;
sbeg = *state->pc++;
nstrs = *state->pc++;
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author