patch-2.4.20 linux-2.4.20/drivers/isdn/pcbit/drv.c

Next file: linux-2.4.20/drivers/macintosh/Makefile
Previous file: linux-2.4.20/drivers/isdn/isdn_ppp.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.19/drivers/isdn/pcbit/drv.c linux-2.4.20/drivers/isdn/pcbit/drv.c
@@ -430,7 +430,7 @@
 	switch(dev->l2_state) {
 	case L2_LWMODE:
 		/* check (size <= rdp_size); write buf into board */
-		if (len > BANK4 + 1)
+		if (len < 0 || len > BANK4 + 1)
 		{
 			printk("pcbit_writecmd: invalid length %d\n", len);
 			return -EINVAL;

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