[Midnightbsd-cvs] src [8010] trunk/bin/ps/ps.c: avoid passing uninialized stack to addelem
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Sep 15 04:56:10 EDT 2016
Revision: 8010
http://svnweb.midnightbsd.org/src/?rev=8010
Author: laffer1
Date: 2016-09-15 04:56:10 -0400 (Thu, 15 Sep 2016)
Log Message:
-----------
avoid passing uninialized stack to addelem
Modified Paths:
--------------
trunk/bin/ps/ps.c
Modified: trunk/bin/ps/ps.c
===================================================================
--- trunk/bin/ps/ps.c 2016-09-15 08:48:41 UTC (rev 8009)
+++ trunk/bin/ps/ps.c 2016-09-15 08:56:10 UTC (rev 8010)
@@ -1,4 +1,4 @@
-/* $MidnightBSD: src/bin/ps/ps.c,v 1.3 2011/02/16 14:28:33 laffer1 Exp $ */
+/* $MidnightBSD$ */
/*-
* Copyright (c) 1990, 1993, 1994
* The Regents of the University of California. All rights reserved.
@@ -890,8 +890,8 @@
int toolong;
char elemcopy[PATH_MAX];
- if (*argp == 0)
- inf->addelem(inf, elemcopy);
+ if (*argp == '\0')
+ inf->addelem(inf, argp);
while (*argp != '\0') {
while (*argp != '\0' && strchr(W_SEP, *argp) != NULL)
argp++;
More information about the Midnightbsd-cvs
mailing list