NetBSD Problem Report #10096

Received: (qmail 14597 invoked from network); 11 May 2000 04:51:24 -0000
Message-Id: <20000511134723X.yyamano@kt.rim.or.jp>
Date: Thu, 11 May 2000 13:45:08 +0900
From: yyamano@kt.rim.or.jp
Reply-To: yyamano@kt.rim.or.jp
To: gnats-bugs@gnats.netbsd.org
Subject: /bin/ps segmentation fault
X-Send-Pr-Version: 3.95

>Number:         10096
>Category:       bin
>Synopsis:       /bin/ps segmentation fault
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 11 04:52:00 +0000 2000
>Closed-Date:    Thu May 25 09:54:10 +0000 2000
>Last-Modified:  Thu May 25 09:54:10 +0000 2000
>Originator:     Yuji Yamano
>Release:        NetBSD 1.4.1
>Organization:
>Environment:
System: NetBSD casper 1.4.1 NetBSD 1.4.1 (CASPER.v6) #1: Wed Jan 26 19:31:49 JST 2000 yyamano@casper:/usr/home/yyamano/src/KAME/kame/netbsd/sys/arch/i386/compile/CASPER.v6 i386

>Description:

When run `ps -O,', it says "Segmentation fault".

>How-To-Repeat:
% /bin/ps -O,
Segmentation fault

>Fix:

--- keyword.c.orig	Wed Feb 18 06:37:56 1998
+++ /usr/src/bin/ps/keyword.c	Thu May 11 13:06:13 2000
@@ -216,7 +216,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, "%s", "");
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: mjl 
State-Changed-When: Thu May 25 02:53:27 PDT 2000 
State-Changed-Why:  
Fixed, thanks for the patch! 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.