Skip to content

Commit

Permalink
V4L/DVB (4488): Fix possible crash in Hauppauge eeprom reading
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trent Piepho authored and Mauro Carvalho Chehab committed Sep 26, 2006
1 parent 40346b2 commit 18795eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/video/tveeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,6 +605,8 @@ void tveeprom_hauppauge_analog(struct i2c_client *c, struct tveeprom *tvee,
tvee->tuner_formats |= hauppauge_tuner_fmt[i].id;
t_fmt_name1[j++] = hauppauge_tuner_fmt[i].name;
}
}
for (i = j = 0; i < 8; i++) {
if (t_format2 & (1 << i)) {
tvee->tuner2_formats |= hauppauge_tuner_fmt[i].id;
t_fmt_name2[j++] = hauppauge_tuner_fmt[i].name;
Expand Down

0 comments on commit 18795eb

Please sign in to comment.