All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] slram: Read buffer overflow
@ 2009-07-31 12:47 Roel Kluin
  0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-07-31 12:47 UTC (permalink / raw)
  To: dwmw2, linux-mtd, Andrew Morton

map[count] is checked before count < SLRAM_MAX_DEVICES_PARAMS

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
declared on drivers/mtd/devices/slram.c:66:

static char *map[SLRAM_MAX_DEVICES_PARAMS];

diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c
index 00248e8..239500b 100644
--- a/drivers/mtd/devices/slram.c
+++ b/drivers/mtd/devices/slram.c
@@ -341,7 +341,7 @@ static int init_slram(void)
 #else
 	int count;
 
-	for (count = 0; (map[count]) && (count < SLRAM_MAX_DEVICES_PARAMS);
+	for (count = 0; count < SLRAM_MAX_DEVICES_PARAMS && map[count];
 			count++) {
 	}
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-07-31 12:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-31 12:47 [PATCH] slram: Read buffer overflow Roel Kluin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.