Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Feb 2001 21:39:01 -0800 (PST)
From:      "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net>
To:        beholder@unios.dhs.org (Pat Wendorf)
Cc:        freebsd-stable@FreeBSD.ORG (freebsd-stable@FreeBSD.ORG)
Subject:   Re: segfault "ps" in one easy step
Message-ID:  <200102140539.VAA57833@gndrsh.dnsmgr.net>
In-Reply-To: <3A8A155E.DD000B96@unios.dhs.org> from Pat Wendorf at "Feb 14, 2001 00:19:26 am"

next in thread | previous in thread | raw e-mail | index | archive | help
> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200102140539.VAA57833>