patch-1.3.75 linux/net/ipv4/tcp.c
Next file: linux/net/ipv4/tcp_input.c
Previous file: linux/net/ipv4/route.c
Back to the patch index
Back to the overall index
-  Lines: 12
 -  Date:
Fri Mar 15 09:32:32 1996
 -  Orig file: 
v1.3.74/linux/net/ipv4/tcp.c
 -  Orig date: 
Wed Mar 13 10:09:27 1996
 
diff -u --recursive --new-file v1.3.74/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
@@ -1042,6 +1042,11 @@
 				copy = sk->mss;
 			if (copy > seglen)
 				copy = seglen;
+			if (copy <= 0) 
+			{
+				printk("TCP: **bug**: copy=%d, sk->mss=%d\n", copy, sk->mss);
+		  		return -EFAULT;
+			}
 
 		/*
 		 *	We should really check the window here also. 
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this