mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-18 15:30:21 +00:00
Avoid NULL pointer dereference, for a process which is not (yet) a
member of a process group, e.g. during the system bootstrap. Submitted by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> MFC after: 1 week
This commit is contained in:
parent
8310528673
commit
16952e289f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298043
@ -184,7 +184,8 @@ db_ps(db_expr_t addr, bool hasaddr, db_expr_t count, char *modif)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user