patch-2.4.10 linux/drivers/net/ppp_generic.c

Next file: linux/drivers/net/sis900.c
Previous file: linux/drivers/net/pcnet32.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/drivers/net/ppp_generic.c linux/drivers/net/ppp_generic.c
@@ -636,7 +636,7 @@
 
 		if (copy_from_user(&uprog, (void *) arg, sizeof(uprog)))
 			break;
-		if (uprog.len > 0) {
+		if (uprog.len > 0 && uprog.len < 65536) {
 			err = -ENOMEM;
 			len = uprog.len * sizeof(struct sock_filter);
 			code = kmalloc(len, GFP_KERNEL);

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