aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tveeprom.c
diff options
context:
space:
mode:
authorTrent Piepho <xyzzy@speakeasy.org>2006-08-07 18:43:21 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 11:30:31 -0400
commit18795eb98d117dbb96fadfc17a7da44c93857fd6 (patch)
treeca4a4209c302bac8d16d30f6eee85523db3a0c8e /drivers/media/video/tveeprom.c
parent40346b290fcbf95d17c05ffe5101a1b5de8af548 (diff)
V4L/DVB (4488): Fix possible crash in Hauppauge eeprom reading
If an eeprom defined two tuners and they supported more than eight standards combined (as opposed to each), it would overflow an array. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tveeprom.c')
-rw-r--r--drivers/media/video/tveeprom.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c
index d95529e8e513..cd1502ac9560 100644
--- a/drivers/media/video/tveeprom.c
+++ b/drivers/media/video/tveeprom.c
@@ -605,6 +605,8 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
605 tvee->tuner_formats |= hauppauge_tuner_fmt[i].id; 605 tvee->tuner_formats |= hauppauge_tuner_fmt[i].id;
606 t_fmt_name1[j++] = hauppauge_tuner_fmt[i].name; 606 t_fmt_name1[j++] = hauppauge_tuner_fmt[i].name;
607 } 607 }
608 }
609 for (i = j = 0; i < 8; i++) {
608 if (t_format2 & (1 << i)) { 610 if (t_format2 & (1 << i)) {
609 tvee->tuner2_formats |= hauppauge_tuner_fmt[i].id; 611 tvee->tuner2_formats |= hauppauge_tuner_fmt[i].id;
610 t_fmt_name2[j++] = hauppauge_tuner_fmt[i].name; 612 t_fmt_name2[j++] = hauppauge_tuner_fmt[i].name;