carminefb: beyond ARRAY_SIZE of carmine_modedb
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 1 line · On Wed, 20 May 2009 02:41:18 +0200 Roel Kluin <[email protected]> wrote:
CC [email protected], Andrew Morton <[email protected]>
You mistyped the list address.
Quoted 5 lines
Subject: [PATCH] carminefb: beyond
ARRAY_SIZEofcarmine_modedb
Date: Wed, 20 May 2009 02:41:18 +0200
User-Agent: Thunderbird 2.0.0.21 (X11/20090302)Do not go beyond
ARRAY_SIZEofcarmine_modedb
Sort-of. I changed the title and changelog:
Subject: carminefb: fix possible access beyond end of carmine_modedb[]
From: Roel Kluin <[email protected]>
This check is off-by-one.
---
drivers/video/carminefb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/carminefb.c renamed from drivers/video/carminefb.c~carminefb-beyond-array_size-of-carmine_modedb +1 -1
@@ -562,7 +562,7 @@ static int __devinit alloc_carmine_fb(voif (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 ;
_
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com