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;
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"