]> err.no Git - linux-2.6/commitdiff
[PATCH] drivers/video/radeonfb.c: fix an array overflow
authorAdrian Bunk <bunk@stusta.de>
Sun, 1 May 2005 15:59:30 +0000 (08:59 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 1 May 2005 15:59:30 +0000 (08:59 -0700)
This patch fixes an array overflow found by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/radeonfb.c

index d9a084e77a6323dc4904c9d0cba10d5e098af434..c46387024b1d55717f4a8deaf5cd71dd71179a70 100644 (file)
@@ -2107,7 +2107,7 @@ static void radeon_write_mode (struct radeonfb_info *rinfo,
 
 
        if (rinfo->arch == RADEON_M6) {
-               for (i=0; i<8; i++)
+               for (i=0; i<7; i++)
                        OUTREG(common_regs_m6[i].reg, common_regs_m6[i].val);
        } else {
                for (i=0; i<9; i++)