You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sys-apps/ifplugd/files/ifplugd-0.28-nlapi.diff

13 lines
571 B

diff -urN src/nlapi.c src/nlapi.c
--- a/src/nlapi.c
+++ b/src/nlapi.c
@@ -86,7 +86,7 @@
for (; bytes > 0; p = NLMSG_NEXT(p, bytes)) {
struct callback_info *c;
- if (!NLMSG_OK(p, bytes) || (size_t) bytes < sizeof(struct nlmsghdr) || (size_t) bytes < p->nlmsg_len) {
+ if (!NLMSG_OK(p, (size_t) bytes) || (size_t) bytes < sizeof(struct nlmsghdr) || (size_t) bytes < (size_t) p->nlmsg_len) {
daemon_log(LOG_ERR, "NLAPI: Packet too small or truncated!\n");
return -1;
}