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

Next file: linux/net/ethernet/eth.c
Previous file: linux/net/core/dv.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.2/linux/net/decnet/af_decnet.c linux/net/decnet/af_decnet.c
@@ -1431,10 +1431,13 @@
 	struct	sock *sk = sock->sk;
 	struct dn_scp *scp = DN_SK(sk);
 	struct linkinfo_dn link;
-	int r_len = *optlen;
+	int r_len;
 	void *r_data = NULL;
-	int val;
+	unsigned int val;
 
+	if(get_user(r_len , optlen))
+		return -EFAULT;
+		
 	switch(optname) {
 		case DSO_CONDATA:
 			if (r_len > sizeof(struct optdata_dn))

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