aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/vc032x.c
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 /drivers/media/video/gspca/vc032x.c
parentV4L/DVB (13490): gspca - ov534: Add controls for sensor ov965x. (diff)
downloadlinux-dev-6afd2aa856eba0706176cecea1f989b1081c96dc.tar.xz
linux-dev-6afd2aa856eba0706176cecea1f989b1081c96dc.zip
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>
Diffstat (limited to 'drivers/media/video/gspca/vc032x.c')
-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 26675236fbd2..c090efcd8045 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;
}