git: 75e7e3ce34d9 - main - unix: fix incorrect assertion in 4682ac697ce
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 26 May 2022 18:35:59 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=75e7e3ce34d9782d825f7b3579afd82e3de55b5e
commit 75e7e3ce34d9782d825f7b3579afd82e3de55b5e
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2022-05-26 18:35:05 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2022-05-26 18:35:05 +0000
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 c9e40c664042..4903120fffeb 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;