Messages in this thread Patch in this message | | | Date | Tue, 1 Apr 2008 21:49:13 +0400 | From | Cyrill Gorcunov <> | Subject | [PATCH] bttv: fix missed index check |
| |
We should check for proper index first
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> ---
I'm not really familiar with V4L so please check the patch
Index: linux-2.6.git/drivers/media/video/bt8xx/bttv-driver.c =================================================================== --- linux-2.6.git.orig/drivers/media/video/bt8xx/bttv-driver.c 2008-03-21 18:04:39.000000000 +0300 +++ linux-2.6.git/drivers/media/video/bt8xx/bttv-driver.c 2008-04-01 21:29:53.000000000 +0400 @@ -3508,8 +3508,12 @@ static int radio_enum_input(struct file 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; }
| |