projects
/
platform
/
kernel
/
linux-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e951017
)
sdio: fix read buffer overflow
author
Roel Kluin
<roel.kluin@gmail.com>
Tue, 22 Sep 2009 23:45:09 +0000
(16:45 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Wed, 23 Sep 2009 14:39:36 +0000
(07:39 -0700)
Avoid buffer underrun when parsing an invalid CISTPL_VERS_1.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: David Vrabel <david.vrabel@csr.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mmc/core/sdio_cis.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/core/sdio_cis.c
b/drivers/mmc/core/sdio_cis.c
index
963f293
..
6636354
100644
(file)
--- a/
drivers/mmc/core/sdio_cis.c
+++ b/
drivers/mmc/core/sdio_cis.c
@@
-40,7
+40,7
@@
static int cistpl_vers_1(struct mmc_card *card, struct sdio_func *func,
nr_strings++;
}
- if (
buf[i-1] != '\0'
) {
+ if (
nr_strings < 4
) {
printk(KERN_WARNING "SDIO: ignoring broken CISTPL_VERS_1\n");
return 0;
}