From owner-svn-src-stable-9@FreeBSD.ORG Wed Sep 5 02:03:44 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 769DE1065678; Wed, 5 Sep 2012 02:03:44 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 613BD8FC17; Wed, 5 Sep 2012 02:03:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8523ihM054777; Wed, 5 Sep 2012 02:03:44 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8523iNf054775; Wed, 5 Sep 2012 02:03:44 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201209050203.q8523iNf054775@svn.freebsd.org> From: Ed Maste Date: Wed, 5 Sep 2012 02:03:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240123 - stable/9/bin/ps X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 02:03:44 -0000 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++;