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++; _______________________________________________ svn-src-stable-9@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-stable-9 To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"