Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: BUG: "unset pipestatus" coredump
- X-seq: zsh-workers 13917
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: BUG: "unset pipestatus" coredump
- Date: Fri, 6 Apr 2001 09:48:06 +0200 (MET DST)
- In-reply-to: <9ajoja$mdn$1@xxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
Geoff Wing wrote:
> (gdb) run -f
> % unset pipestatus
>
> Program received signal SIGSEGV, Segmentation fault.
Yes, better test if we really get an array.
Bye
Sven
Index: Src/params.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/params.c,v
retrieving revision 1.34
diff -u -r1.34 params.c
--- Src/params.c 2001/04/06 07:38:36 1.34
+++ Src/params.c 2001/04/06 07:46:50
@@ -2873,11 +2873,15 @@
static void
pipestatsetfn(Param pm, char **x)
{
- int i;
+ if (x) {
+ int i;
- for (i = 0; *x && i < MAX_PIPESTATS; i++, x++)
- pipestats[i] = atoi(*x);
- numpipestats = i;
+ for (i = 0; *x && i < MAX_PIPESTATS; i++, x++)
+ pipestats[i] = atoi(*x);
+ numpipestats = i;
+ }
+ else
+ numpipestats = 0;
}
/**/
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author