From owner-freebsd-stable Tue Feb 13 21:39:13 2001 Delivered-To: freebsd-stable@freebsd.org Received: from gndrsh.dnsmgr.net (GndRsh.dnsmgr.net [198.145.92.4]) by hub.freebsd.org (Postfix) with ESMTP id DA52037B491 for ; Tue, 13 Feb 2001 21:39:07 -0800 (PST) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id VAA57833; Tue, 13 Feb 2001 21:39:01 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <200102140539.VAA57833@gndrsh.dnsmgr.net> Subject: Re: segfault "ps" in one easy step In-Reply-To: <3A8A155E.DD000B96@unios.dhs.org> from Pat Wendorf at "Feb 14, 2001 00:19:26 am" To: beholder@unios.dhs.org (Pat Wendorf) Date: Tue, 13 Feb 2001 21:39:01 -0800 (PST) Cc: freebsd-stable@FreeBSD.ORG (freebsd-stable@FreeBSD.ORG) X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Try this: > > ps -o, > > I've tried it on a couple of my machines, please fix. > > Interesting to note NetBSD and OpenBSD are fine. Here is the fix from NetBSD: --- keyword.c.orig Tue Feb 13 21:37:42 2001 +++ keyword.c Tue Feb 13 21:38:08 2001 @@ -227,7 +227,7 @@ while ((cp = strsep(&p, FMTSEP)) != NULL && *cp == '\0') /* void */; - if (!(v = findvar(cp))) + if (cp == NULL || !(v = findvar(cp))) continue; if ((vent = malloc(sizeof(struct varent))) == NULL) err(1, NULL); -- Rod Grimes - KD7CAX @ CN85sl - (RWG25) rgrimes@gndrsh.dnsmgr.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message