Skip to content

Commit

Permalink
V4L/DVB (13491): gspca - vc032x: Avoid crash on querymenu.
Browse files Browse the repository at this point in the history
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent c22c4a2 commit 6afd2aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/video/gspca/vc032x.c
Original file line number Diff line number Diff line change
Expand Up @@ -3095,6 +3095,8 @@ static int sd_querymenu(struct gspca_dev *gspca_dev,

switch (menu->id) {
case V4L2_CID_POWER_LINE_FREQUENCY:
if (menu->index >= ARRAY_SIZE(freq_nm))
break;
strcpy((char *) menu->name, freq_nm[menu->index]);
return 0;
}
Expand Down

0 comments on commit 6afd2aa

Please sign in to comment.