aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-11-24 06:13:28 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 18:42:08 -0200
commit6afd2aa856eba0706176cecea1f989b1081c96dc (patch)
treeaed71aba53de8f42d2da61b2a783d0ed021589d1
parentc22c4a20a6ac7b10e43eab6963f941795c5e92aa (diff)
V4L/DVB (13491): gspca - vc032x: Avoid crash on querymenu.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/gspca/vc032x.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c
index 26675236fbd..c090efcd804 100644
--- a/drivers/media/video/gspca/vc032x.c
+++ b/drivers/media/video/gspca/vc032x.c
@@ -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;
}