From owner-svn-src-all@freebsd.org Thu Aug 25 23:24:58 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 449F8BC5DC5; Thu, 25 Aug 2016 23:24:58 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0737E1E7F; Thu, 25 Aug 2016 23:24:57 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u7PNOvMM008561; Thu, 25 Aug 2016 23:24:57 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u7PNOvYI008560; Thu, 25 Aug 2016 23:24:57 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201608252324.u7PNOvYI008560@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Thu, 25 Aug 2016 23:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r304825 - head/cddl/lib/libdtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Aug 2016 23:24:58 -0000 Author: gnn Date: Thu Aug 25 23:24:57 2016 New Revision: 304825 URL: https://svnweb.freebsd.org/changeset/base/304825 Log: Unlike Solaris, in FreeBSD p_args can be 0 so check for that instead of walking down to ar_args blindly. Reported by: Amanda Strnad Reviewed by: markj, jhb MFC after: 2 weeks Sponsored by: DARPA, AFRL Modified: head/cddl/lib/libdtrace/psinfo.d Modified: head/cddl/lib/libdtrace/psinfo.d ============================================================================== --- head/cddl/lib/libdtrace/psinfo.d Thu Aug 25 23:06:12 2016 (r304824) +++ head/cddl/lib/libdtrace/psinfo.d Thu Aug 25 23:24:57 2016 (r304825) @@ -59,7 +59,7 @@ translator psinfo_t < struct proc *T > { pr_gid = T->p_ucred->cr_rgid; pr_egid = T->p_ucred->cr_groups[0]; pr_addr = 0; - pr_psargs = (T->p_args->ar_args == 0) ? "" : + pr_psargs = (T->p_args == 0) ? "" : memstr(T->p_args->ar_args, ' ', T->p_args->ar_length); pr_arglen = T->p_args->ar_length; pr_jailid = T->p_ucred->cr_prison->pr_id;