From owner-freebsd-stable Tue Feb 13 21:40:25 2001 Delivered-To: freebsd-stable@freebsd.org Received: from hand.dotat.at (sfo-gw.covalent.net [207.44.198.62]) by hub.freebsd.org (Postfix) with ESMTP id E13A437B4EC for ; Tue, 13 Feb 2001 21:40:19 -0800 (PST) Received: from fanf by hand.dotat.at with local (Exim 3.20 #3) id 14Sufo-0006q3-00; Wed, 14 Feb 2001 05:40:16 +0000 Date: Wed, 14 Feb 2001 05:40:16 +0000 From: Tony Finch To: Pat Wendorf Cc: "freebsd-stable@FreeBSD.ORG" Subject: Re: segfault "ps" in one easy step Message-ID: <20010214054016.G412@hand.dotat.at> References: <3A8A155E.DD000B96@unios.dhs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3A8A155E.DD000B96@unios.dhs.org> Organization: Covalent Technologies, Inc Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Pat Wendorf wrote: > >ps -o, > >I've tried it on a couple of my machines, please fix. Index: keyword.c =================================================================== RCS file: /home/ncvs/src/bin/ps/keyword.c,v retrieving revision 1.24 diff -u -r1.24 keyword.c --- keyword.c 1999/08/27 23:14:51 1.24 +++ keyword.c 2001/02/14 05:36:27 @@ -227,6 +227,8 @@ while ((cp = strsep(&p, FMTSEP)) != NULL && *cp == '\0') /* void */; + if (!cp) + break; if (!(v = findvar(cp))) continue; if ((vent = malloc(sizeof(struct varent))) == NULL) Tony. -- f.a.n.finch fanf@covalent.net dot@dotat.at BISCAY: EASTERLY OR NORTHEASTERLY 4 OR 5 DECREASING 3. FAIR. GOOD. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message