Do not coredump if no options are supplied. (ps -o,)
Submitted by: rgrimes Obtained from: NetBSD
This commit is contained in:
parent
ad4ba1ec87
commit
f6213d478d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=72489
@ -219,7 +219,7 @@ parsefmt(p)
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user