projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c22c4a2
)
V4L/DVB (13491): gspca - vc032x: Avoid crash on querymenu.
author
Jean-Francois Moine
<moinejf@free.fr>
Tue, 24 Nov 2009 09:13:28 +0000
(06:13 -0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Sat, 5 Dec 2009 20:42:08 +0000
(18:42 -0200)
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/vc032x.c
patch
|
blob
|
history
diff --git
a/drivers/media/video/gspca/vc032x.c
b/drivers/media/video/gspca/vc032x.c
index 26675236fbd21a08d063ebf547799ad59c14d5dc..c090efcd80454e605e3935cbd3ef2231300e5dee 100644
(file)
--- 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;
}