From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24952 invoked from network); 6 Apr 2001 07:48:13 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 6 Apr 2001 07:48:13 -0000 Received: (qmail 2135 invoked by alias); 6 Apr 2001 07:48:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13917 Received: (qmail 2122 invoked from network); 6 Apr 2001 07:48:08 -0000 From: Sven Wischnowsky Date: Fri, 6 Apr 2001 09:48:06 +0200 (MET DST) Message-Id: <200104060748.JAA11678@beta.informatik.hu-berlin.de> To: zsh-workers@sunsite.dk Subject: Re: BUG: "unset pipestatus" coredump In-Reply-To: <9ajoja$mdn$1@coral.primenet.com.au> 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@informatik.hu-berlin.de