]> err.no Git - linux-2.6/commitdiff
V4L/DVB (4508): Fix an array overflow on bt866
authorMauro Carvalho Chehab <mchehab@infradead.org>
Fri, 18 Aug 2006 10:40:28 +0000 (07:40 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Tue, 26 Sep 2006 15:30:32 +0000 (12:30 -0300)
The Coverity checker spotted the following two array overflows.
Registers 0xcc and 0xdc were cached on reg[] array, with only 128 elements,
instead of 256.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/bt866.c

index 05e42bbcfc3d5c26a5e034f20445f3f9803c914f..772fd52d551aaf35a5a43cb363831e1f51be9bc8 100644 (file)
@@ -65,7 +65,7 @@ MODULE_LICENSE("GPL");
 struct bt866 {
        struct i2c_client *i2c;
        int addr;
-       unsigned char reg[128];
+       unsigned char reg[256];
 
        int norm;
        int enable;