patch-2.4.19 linux-2.4.19/drivers/sbus/char/openprom.c
Next file: linux-2.4.19/drivers/sbus/char/pcikbd.c
Previous file: linux-2.4.19/drivers/sbus/audio/cs4231.c
Back to the patch index
Back to the overall index
- Lines: 10
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/sbus/char/openprom.c
- Orig date:
Wed Oct 10 23:42:47 2001
diff -urN linux-2.4.18/drivers/sbus/char/openprom.c linux-2.4.19/drivers/sbus/char/openprom.c
@@ -334,6 +334,9 @@
{
char *tmp;
+ if ((ssize_t)len < 0 || (ssize_t)(len + 1) < 0)
+ return -EINVAL;
+
tmp = kmalloc(len + 1, GFP_KERNEL);
if (!tmp)
return -ENOMEM;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)