Date: Wed, 14 Feb 2001 05:40:16 +0000 From: Tony Finch <dot@dotat.at> To: Pat Wendorf <beholder@unios.dhs.org> Cc: "freebsd-stable@FreeBSD.ORG" <freebsd-stable@FreeBSD.ORG> Subject: Re: segfault "ps" in one easy step Message-ID: <20010214054016.G412@hand.dotat.at> In-Reply-To: <3A8A155E.DD000B96@unios.dhs.org> References: <3A8A155E.DD000B96@unios.dhs.org>
index | next in thread | previous in thread | raw e-mail
Pat Wendorf <beholder@unios.dhs.org> 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
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010214054016.G412>
