Date: Wed, 5 Sep 2012 02:03:44 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r240123 - stable/9/bin/ps Message-ID: <201209050203.q8523iNf054775@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Wed Sep 5 02:03:43 2012 New Revision: 240123 URL: http://svn.freebsd.org/changeset/base/240123 Log: MFC 239883: Avoid passing uninitialized stack to addelem() if called with an empty arg. PR: bin/171174 Modified: stable/9/bin/ps/ps.c Directory Properties: stable/9/bin/ps/ (props changed) Modified: stable/9/bin/ps/ps.c ============================================================================== --- stable/9/bin/ps/ps.c Tue Sep 4 23:27:07 2012 (r240122) +++ stable/9/bin/ps/ps.c Wed Sep 5 02:03:43 2012 (r240123) @@ -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?201209050203.q8523iNf054775>