patch-2.4.9 linux/net/ipv4/ipmr.c

Next file: linux/net/ipv4/netfilter/ipchains_core.c
Previous file: linux/net/ipv4/ip_sockglue.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/net/ipv4/ipmr.c linux/net/ipv4/ipmr.c
@@ -9,7 +9,7 @@
  *	as published by the Free Software Foundation; either version
  *	2 of the License, or (at your option) any later version.
  *
- *	Version: $Id: ipmr.c,v 1.60 2001/06/29 21:33:22 davem Exp $
+ *	Version: $Id: ipmr.c,v 1.63 2001/08/13 18:56:12 davem Exp $
  *
  *	Fixes:
  *	Michael Chastain	:	Incorrect size of copying.
@@ -976,11 +976,11 @@
 	   optname!=MRT_ASSERT)
 		return -ENOPROTOOPT;
 
-	if(get_user(olr, optlen))
+	if (get_user(olr, optlen))
 		return -EFAULT;
 
-	olr=min(olr,sizeof(int));
-	if(olr<0)
+	olr = min(unsigned int, olr, sizeof(int));
+	if (olr < 0)
 		return -EINVAL;
 		
 	if(put_user(olr,optlen))

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