From: Roel Kluin <roel.kluin@gmail.com>
To: dwmw2@infradead.org, linux-mtd@lists.infradead.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] slram: Read buffer overflow
Date: Fri, 31 Jul 2009 14:47:58 +0200 [thread overview]
Message-ID: <4A72E7FE.6000207@gmail.com> (raw)
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++) {
}
reply other threads:[~2009-07-31 12:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A72E7FE.6000207@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dwmw2@infradead.org \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).