mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 19:26:25 +00:00
carminefb: fix possible access beyond end of carmine_modedb[]
This check is off-by-one. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Cc: Sebastian Siewior <bigeasy@linutronix.de> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
34308fd4a2
commit
493f139ecf
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue