projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.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
|
blame
|
history
diff --git
a/drivers/mmc/core/sdio_cis.c
b/drivers/mmc/core/sdio_cis.c
index 963f2937c5e37da83819249826995aa098751f99..6636354b48ceac476c3ecbb7a88054dd4047d8d2 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;
}