Skip to content

Commit

Permalink
V4L/DVB (3568f): saa7110: Fix array overrun
Browse files Browse the repository at this point in the history
Fix a (probably harmless) array overrun in the DECODER_DUMP command of the
saa7110 driver.  No big deal as this command is not used anywhere anyway. 
Also reformat the dump so that it displays nicely.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Jean Delvare authored and Mauro Carvalho Chehab committed Mar 23, 2006
1 parent f49a5ea commit 6201573
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions drivers/media/video/saa7110.c
Original file line number Diff line number Diff line change
Expand Up @@ -432,15 +432,13 @@ saa7110_command (struct i2c_client *client,
break;

case DECODER_DUMP:
for (v = 0; v < 0x34; v += 16) {
for (v = 0; v < SAA7110_NR_REG; v += 16) {
int j;
dprintk(1, KERN_INFO "%s: %03x\n", I2C_NAME(client),
dprintk(1, KERN_DEBUG "%s: %02x:", I2C_NAME(client),
v);
for (j = 0; j < 16; j++) {
dprintk(1, KERN_INFO " %02x",
decoder->reg[v + j]);
}
dprintk(1, KERN_INFO "\n");
for (j = 0; j < 16 && v + j < SAA7110_NR_REG; j++)
dprintk(1, " %02x", decoder->reg[v + j]);
dprintk(1, "\n");
}
break;

Expand Down

0 comments on commit 6201573

Please sign in to comment.