From 75e7e3ce34d9782d825f7b3579afd82e3de55b5e Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Thu, 26 May 2022 11:35:05 -0700 Subject: [PATCH] unix: fix incorrect assertion in 4682ac697ce Pointy hat to: glebius Fixes: 4682ac697ce9b306d11e03a628d1ac07f4b540c8 --- sys/kern/uipc_usrreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index c9e40c66404..4903120fffe 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -2015,7 +2015,7 @@ unp_externalize(struct mbuf *control, struct mbuf **controlp, int flags) if (controlp != NULL) /* controlp == NULL => free control messages */ *controlp = NULL; while (cm != NULL) { - MPASS(clen >= sizeof(*cm) && clen <= cm->cmsg_len); + MPASS(clen >= sizeof(*cm) && clen >= cm->cmsg_len); data = CMSG_DATA(cm); datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data;