diff options
author | Trent Piepho <xyzzy@speakeasy.org> | 2006-08-07 15:43:21 -0700 |
---|---|---|
committer | Trent Piepho <xyzzy@speakeasy.org> | 2006-08-07 15:43:21 -0700 |
commit | e265a4b0ea1a0ef711d27f58ab249e459e52da5c (patch) | |
tree | 1f3de42c991b4aa7da1d4690797a3bda5c07474f /linux/drivers | |
parent | 0a39bdda978bb695afe7bb17b722e361be76d02b (diff) | |
download | mediapointer-dvb-s2-e265a4b0ea1a0ef711d27f58ab249e459e52da5c.tar.gz mediapointer-dvb-s2-e265a4b0ea1a0ef711d27f58ab249e459e52da5c.tar.bz2 |
Fix possible crash in Hauppauge eeprom reading
From: Trent Piepho <xyzzy@speakeasy.org>
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>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/tveeprom.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/linux/drivers/media/video/tveeprom.c b/linux/drivers/media/video/tveeprom.c index 2f73bcf33..7670ae921 100644 --- a/linux/drivers/media/video/tveeprom.c +++ b/linux/drivers/media/video/tveeprom.c @@ -609,6 +609,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; |