patch-2.0.32 linux/net/ipv4/ip_fragment.c

Next file: linux/net/ipv4/ip_masq_quake.c
Previous file: linux/net/core/sock.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.31/linux/net/ipv4/ip_fragment.c linux/net/ipv4/ip_fragment.c
@@ -375,7 +375,7 @@
 	fp = qp->fragments;
 	while(fp != NULL)
 	{
-		if(count+fp->len > skb->len)
+		if (fp->len < 0 || count+fp->len > skb->len)
 		{
 			NETDEBUG(printk("Invalid fragment list: Fragment over size.\n"));
 			ip_free(qp);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov