patch-2.4.6 linux/net/decnet/af_decnet.c

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

diff -u --recursive --new-file v2.4.5/linux/net/decnet/af_decnet.c linux/net/decnet/af_decnet.c
@@ -1488,7 +1488,11 @@
 		default:
 #ifdef CONFIG_NETFILTER
 		{
-			int val, len = *optlen;
+			int val, len;
+			
+			if(get_user(len, optlen))
+				return -EFAULT;
+			
 			val = nf_getsockopt(sk, PF_DECnet, optname, 
 							optval, &len);
 			if (val >= 0)

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