Author: markj
Date: Tue Oct 15 14:19:14 2019
New Revision: 353554
URL: https://svnweb.freebsd.org/changeset/base/353554

Log:
  MFC r353331:
  Fix handling of empty SCM_RIGHTS messages.

Modified:
  stable/12/sys/kern/uipc_usrreq.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/kern/uipc_usrreq.c
==============================================================================
--- stable/12/sys/kern/uipc_usrreq.c    Tue Oct 15 14:18:40 2019        
(r353553)
+++ stable/12/sys/kern/uipc_usrreq.c    Tue Oct 15 14:19:14 2019        
(r353554)
@@ -2318,7 +2318,8 @@ unp_internalize(struct mbuf **controlp, struct thread 
                        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 *)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to