]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/core/skbuff.c
net: BUG instead of corrupting memory in pskb_expand_head
[linux-2.6-omap-h63xx.git] / net / core / skbuff.c
index 2c218a0808b4d5fa0a09e90ae8edac6c2b27affe..8bd248a64879bcac5f91a53659abcb281ada594a 100644 (file)
@@ -738,6 +738,8 @@ int pskb_expand_head(struct sk_buff *skb, int nhead, int ntail,
 #endif
        long off;
 
+       BUG_ON(nhead < 0);
+
        if (skb_shared(skb))
                BUG();