patch-2.2.19 linux/net/irda/af_irda.c

Next file: linux/net/netrom/af_netrom.c
Previous file: linux/net/ipx/af_ipx.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/irda/af_irda.c linux/net/irda/af_irda.c
@@ -1842,6 +1842,9 @@
 	if (get_user(len, optlen))
 		return -EFAULT;
 
+	if (len < 0)
+		return -EINVAL;
+		
 	switch (optname) {
 	case IRLMP_ENUMDEVICES:
 		/* Tell IrLMP we want to be notified */

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