unix: fix incorrect assertion in 4682ac697c

Pointy hat to:	glebius
Fixes:		4682ac697c
This commit is contained in:
Gleb Smirnoff 2022-05-26 11:35:05 -07:00
parent 442bf90e52
commit 75e7e3ce34

View file

@ -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;