Skip to content

Commit

Permalink
V4L/DVB (7461): bttv: fix missed index check
Browse files Browse the repository at this point in the history
We should check for proper index first

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Cyrill Gorcunov authored and Mauro Carvalho Chehab committed Apr 1, 2008
1 parent c137918 commit 1a002eb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/video/bt8xx/bttv-driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -3518,8 +3518,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;
}

Expand Down

0 comments on commit 1a002eb

Please sign in to comment.