projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34308fd
)
carminefb: fix possible access beyond end of carmine_modedb[]
author
Roel Kluin
<
[email protected]
>
Tue, 16 Jun 2009 22:34:32 +0000
(15:34 -0700)
committer
Linus Torvalds
<
[email protected]
>
Wed, 17 Jun 2009 02:47:59 +0000
(19:47 -0700)
This check is off-by-one.
Signed-off-by: Roel Kluin <
[email protected]
>
Cc: Sebastian Siewior <
[email protected]
>
Cc: Krzysztof Helt <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/video/carminefb.c
patch
|
blob
|
history
diff --git
a/drivers/video/carminefb.c
b/drivers/video/carminefb.c
index c7ff3c1a266a3611c2081e71e56bbb29264eaa0b..0c02f8ec4bf3dafe14965025a3a1121e19ab4dfd 100644
(file)
--- a/
drivers/video/carminefb.c
+++ b/
drivers/video/carminefb.c
@@
-562,7
+562,7
@@
static int __devinit alloc_carmine_fb(void __iomem *regs, void __iomem *smem_bas
if (ret < 0)
goto err_free_fb;
- if (fb_mode > ARRAY_SIZE(carmine_modedb))
+ if (fb_mode >
=
ARRAY_SIZE(carmine_modedb))
fb_mode = CARMINEFB_DEFAULT_VIDEO_MODE;
par->cur_mode = par->new_mode = ~0;