diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-01 17:49:13 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-01 17:49:13 +0000 |
commit | 6b8e1941619bd16379eac9563643a370c2e8c5d6 (patch) | |
tree | ff731fe6fa417fd476aad49a1c19d50f69a93f51 /linux/drivers/media/video/bt8xx | |
parent | dacccb05d56ba22e51620a78a36a74ee1c96b5f4 (diff) | |
download | mediapointer-dvb-s2-6b8e1941619bd16379eac9563643a370c2e8c5d6.tar.gz mediapointer-dvb-s2-6b8e1941619bd16379eac9563643a370c2e8c5d6.tar.bz2 |
bttv: fix missed index check
From: Cyrill Gorcunov <gorcunov@gmail.com>
We should check for proper index first
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/bt8xx')
-rw-r--r-- | linux/drivers/media/video/bt8xx/bttv-driver.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 51b4a8b59..8c733bf59 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -3561,8 +3561,12 @@ static int radio_enum_input(struct file *file, void *priv, static int radio_g_audio(struct file *file, void *priv, struct v4l2_audio *a) { + if (a->index != 0) + return -EINVAL; + memset(a, 0, sizeof(*a)); strcpy(a->name, "Radio"); + return 0; } |