patch-2.2.19 linux/net/ipx/af_ipx.c

Next file: linux/net/irda/af_irda.c
Previous file: linux/net/ipv6/raw.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.18/net/ipx/af_ipx.c linux/net/ipx/af_ipx.c
@@ -1769,6 +1769,10 @@
 		return (-EFAULT);
 
 	len = min(len, sizeof(int));
+	
+	if(len < 0)
+		return -EINVAL;
+		
 	if(put_user(len, optlen))
 		return (-EFAULT);
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)