lkml.org 
[lkml]   [2001]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] bulkmem.c - null ptr fixes for 2.4.4
Date
Hi,
Using the Stanford checker, we searched for null-pointer bugs in the linux
kernel code. This patch fixes numerous unchecked pointers in the PCMCIA
bulkmem driver.

Praveen Srinivasan and Frederick Akalin

--- ../linux/./drivers/pcmcia/bulkmem.c Tue Mar 6 19:28:32 2001
+++ ./drivers/pcmcia/bulkmem.c Mon May 7 21:53:49 2001
@@ -229,6 +229,10 @@
else {
erase->State = 1;
busy = kmalloc(sizeof(erase_busy_t), GFP_KERNEL);
+
+ if(busy == NULL) {
+ return;
+ }
busy->erase = erase;
busy->client = handle;
init_timer(&busy->timeout);
@@ -360,6 +364,10 @@
if ((device.dev[i].type != CISTPL_DTYPE_NULL) &&
(device.dev[i].size != 0)) {
r = kmalloc(sizeof(*r), GFP_KERNEL);
+ if(r == NULL) {
+ return;
+ }
+
r->region_magic = REGION_MAGIC;
r->state = 0;
r->dev_info[0] = '\0';
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 12:53    [W:0.045 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site