Date: Wed, 29 Aug 2012 21:40:02 GMT From: dfilter@FreeBSD.ORG (dfilter service) To: freebsd-bugs@FreeBSD.org Subject: Re: bin/171174: commit references a PR Message-ID: <201208292140.q7TLe2ZH036284@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/171174; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/171174: commit references a PR Date: Wed, 29 Aug 2012 21:38:44 +0000 (UTC) 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++; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208292140.q7TLe2ZH036284>