diff options
author | Jean Delvare <khali@linux-fr.org> | 2006-03-22 01:48:30 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-03-23 09:24:16 -0500 |
commit | 6201573cc9bfe1e0bdec229bed8e95b0dc88a587 (patch) | |
tree | 35a5377e4bc8ba7a94d53631911638b5a739034a /drivers/media/video/saa7110.c | |
parent | f49a5eaea6d7b3ed3d01ca9388eac9e7e5bf6025 (diff) |
V4L/DVB (3568f): saa7110: Fix array overrun
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>
Diffstat (limited to 'drivers/media/video/saa7110.c')
-rw-r--r-- | drivers/media/video/saa7110.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/media/video/saa7110.c b/drivers/media/video/saa7110.c index 7bb85a7b326..20cad9fc99e 100644 --- a/drivers/media/video/saa7110.c +++ b/drivers/media/video/saa7110.c | |||
@@ -432,15 +432,13 @@ saa7110_command (struct i2c_client *client, | |||
432 | break; | 432 | break; |
433 | 433 | ||
434 | case DECODER_DUMP: | 434 | case DECODER_DUMP: |
435 | for (v = 0; v < 0x34; v += 16) { | 435 | for (v = 0; v < SAA7110_NR_REG; v += 16) { |
436 | int j; | 436 | int j; |
437 | dprintk(1, KERN_INFO "%s: %03x\n", I2C_NAME(client), | 437 | dprintk(1, KERN_DEBUG "%s: %02x:", I2C_NAME(client), |
438 | v); | 438 | v); |
439 | for (j = 0; j < 16; j++) { | 439 | for (j = 0; j < 16 && v + j < SAA7110_NR_REG; j++) |
440 | dprintk(1, KERN_INFO " %02x", | 440 | dprintk(1, " %02x", decoder->reg[v + j]); |
441 | decoder->reg[v + j]); | 441 | dprintk(1, "\n"); |
442 | } | ||
443 | dprintk(1, KERN_INFO "\n"); | ||
444 | } | 442 | } |
445 | break; | 443 | break; |
446 | 444 | ||