Date: Fri, 22 Apr 2016 08:49:51 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r298465 - stable/10/sys/ddb Message-ID: <201604220849.u3M8npX1049090@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Fri Apr 22 08:49:50 2016 New Revision: 298465 URL: https://svnweb.freebsd.org/changeset/base/298465 Log: MFC r298043: Avoid NULL pointer dereference. Modified: stable/10/sys/ddb/db_ps.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/ddb/db_ps.c ============================================================================== --- stable/10/sys/ddb/db_ps.c Fri Apr 22 08:11:26 2016 (r298464) +++ stable/10/sys/ddb/db_ps.c Fri Apr 22 08:49:50 2016 (r298465) @@ -181,7 +181,8 @@ db_ps(db_expr_t addr, boolean_t hasaddr, strlcat(state, "V", sizeof(state)); if (p->p_flag & P_SYSTEM || p->p_lock > 0) strlcat(state, "L", sizeof(state)); - if (p->p_session != NULL && SESS_LEADER(p)) + if (p->p_pgrp != NULL && p->p_session != NULL && + SESS_LEADER(p)) strlcat(state, "s", sizeof(state)); /* Cheated here and didn't compare pgid's. */ if (p->p_flag & P_CONTROLT)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604220849.u3M8npX1049090>