]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/decnet/netfilter/dn_rtmsg.c
Merge tag 'platform-drivers-x86-v4.12-2' of git://git.infradead.org/linux-platform...
[karo-tx-linux.git] / net / decnet / netfilter / dn_rtmsg.c
index 1ed81ac6dd1a28b79dff9f9f4e8c1d0f99306a33..aa8ffecc46a439fa129dfea9c1f4d4e525ad3796 100644 (file)
@@ -102,7 +102,9 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)
 {
        struct nlmsghdr *nlh = nlmsg_hdr(skb);
 
-       if (nlh->nlmsg_len < sizeof(*nlh) || skb->len < nlh->nlmsg_len)
+       if (skb->len < sizeof(*nlh) ||
+           nlh->nlmsg_len < sizeof(*nlh) ||
+           skb->len < nlh->nlmsg_len)
                return;
 
        if (!netlink_capable(skb, CAP_NET_ADMIN))