diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2009-11-24 04:13:28 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-12-05 15:42:08 -0500 |
commit | 6afd2aa856eba0706176cecea1f989b1081c96dc (patch) | |
tree | aed71aba53de8f42d2da61b2a783d0ed021589d1 /drivers/media | |
parent | c22c4a20a6ac7b10e43eab6963f941795c5e92aa (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>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/gspca/vc032x.c | 2 |
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, | |||
3095 | 3095 | ||
3096 | switch (menu->id) { | 3096 | switch (menu->id) { |
3097 | case V4L2_CID_POWER_LINE_FREQUENCY: | 3097 | case V4L2_CID_POWER_LINE_FREQUENCY: |
3098 | if (menu->index >= ARRAY_SIZE(freq_nm)) | ||
3099 | break; | ||
3098 | strcpy((char *) menu->name, freq_nm[menu->index]); | 3100 | strcpy((char *) menu->name, freq_nm[menu->index]); |
3099 | return 0; | 3101 | return 0; |
3100 | } | 3102 | } |