Date: Wed, 29 Aug 2012 21:38:35 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r239883 - head/bin/ps Message-ID: <201208292138.q7TLcZuF019193@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Wed Aug 29 21:38:34 2012 New Revision: 239883 URL: http://svn.freebsd.org/changeset/base/239883 Log: Avoid passing uninitialized stack to addelem() if called with an empty arg. PR: bin/171174 Modified: head/bin/ps/ps.c Modified: head/bin/ps/ps.c ============================================================================== --- head/bin/ps/ps.c Wed Aug 29 21:12:19 2012 (r239882) +++ head/bin/ps/ps.c Wed Aug 29 21:38:34 2012 (r239883) @@ -889,8 +889,8 @@ add_list(struct listinfo *inf, const cha 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++;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208292138.q7TLcZuF019193>