From caa4f20dbe0525caf0f95a675b0cc1fcde8f4166 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Tue, 15 Oct 2019 14:45:33 +0000 Subject: [PATCH] MFS r353554: Fix handling of empty SCM_RIGHTS messages. Approved by: re (kib) --- sys/kern/uipc_usrreq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 7ab47aa31bc..e19eed37873 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -2318,7 +2318,8 @@ unp_internalize(struct mbuf **controlp, struct thread *td) goto out; } - controlp = &(*controlp)->m_next; + if (*controlp != NULL) + controlp = &(*controlp)->m_next; if (CMSG_SPACE(datalen) < clen) { clen -= CMSG_SPACE(datalen); cm = (struct cmsghdr *) -- 2.45.0