android_kernel_google_msm/drivers/hid
Dan Carpenter 1259436299 HID: roccat: potential out of bounds in pyra_sysfs_write_settings()
commit 606185b20caf4c57d7e41e5a5ea4aff460aef2ab upstream.

This is a static checker fix.  We write some binary settings to the
sysfs file.  One of the settings is the "->startup_profile".  There
isn't any checking to make sure it fits into the
pyra->profile_settings[] array in the profile_activated() function.

I added a check to pyra_sysfs_write_settings() in both places because
I wasn't positive that the other callers were correct.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
[lizf: Backported to 3.4: define the variable @settings]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-04-14 17:33:52 +08:00
..
usbhid HID: usbhid: fix build problem 2014-04-14 06:44:19 -07:00
hid-a4tech.c
hid-apple.c HID: apple: Add Apple wireless keyboard 2011 ANSI PID 2014-04-14 06:44:18 -07:00
hid-axff.c
hid-belkin.c
hid-cherry.c HID: fix a couple of off-by-ones 2014-09-25 11:49:09 +08:00
hid-chicony.c
hid-core.c HID: core: fix validation of report id 0 2014-06-30 20:01:31 -07:00
hid-cypress.c
hid-debug.c
hid-dr.c
hid-elecom.c
hid-emsff.c
hid-ezkey.c
hid-gaff.c
hid-gyration.c
hid-holtekff.c
hid-hyperv.c
hid-ids.h HID: usbhid: quirk for MSI GX680R led panel 2014-04-14 06:44:19 -07:00
hid-input.c HID: validate feature and input report details 2014-04-14 06:44:18 -07:00
hid-kensington.c
hid-keytouch.c
hid-kye.c HID: fix a couple of off-by-ones 2014-09-25 11:49:09 +08:00
hid-lcpower.c
hid-lg.c HID: fix a couple of off-by-ones 2014-09-25 11:49:09 +08:00
hid-lg.h
hid-lg2ff.c HID: LG: validate HID output report details 2013-10-05 07:06:54 -07:00
hid-lg3ff.c HID: LG: validate HID output report details 2013-10-05 07:06:54 -07:00
hid-lg4ff.c HID: LG: validate HID output report details 2013-10-05 07:06:54 -07:00
hid-lgff.c HID: LG: validate HID output report details 2013-10-05 07:06:54 -07:00
hid-logitech-dj.c HID: logitech-dj: prevent false errors to be shown 2014-09-25 11:49:14 +08:00
hid-logitech-dj.h HID: logitech-dj: prevent false errors to be shown 2014-09-25 11:49:14 +08:00
hid-magicmouse.c HID: magicmouse: sanity check report size in raw_event() callback 2014-09-25 11:49:15 +08:00
hid-microsoft.c HID: microsoft: do not use compound literal - fix build 2013-08-20 08:26:27 -07:00
hid-monterey.c HID: fix a couple of off-by-ones 2014-09-25 11:49:09 +08:00
hid-multitouch.c HID: multitouch: validate indexes details 2014-04-14 06:44:18 -07:00
hid-ntrig.c HID: ntrig: validate feature report details 2013-09-26 17:15:36 -07:00
hid-ortek.c
hid-petalynx.c HID: fix a couple of off-by-ones 2014-09-25 11:49:09 +08:00
hid-picolcd.c HID: picolcd: sanity check report size in raw_event() callback 2014-09-25 11:49:15 +08:00
hid-pl.c HID: pantherlord: validate output report details 2013-09-26 17:15:34 -07:00
hid-primax.c
hid-prodikeys.c
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c
hid-roccat-isku.h
hid-roccat-kone.c
hid-roccat-kone.h
hid-roccat-koneplus.c
hid-roccat-koneplus.h
hid-roccat-kovaplus.c HID: roccat: fix Coverity CID 141438 2013-12-04 10:50:35 -08:00
hid-roccat-kovaplus.h
hid-roccat-pyra.c HID: roccat: potential out of bounds in pyra_sysfs_write_settings() 2015-04-14 17:33:52 +08:00
hid-roccat-pyra.h
hid-roccat.c
hid-saitek.c
hid-samsung.c
hid-sjoy.c
hid-sony.c HID: clean up quirk for Sony RF receivers 2014-04-14 06:44:19 -07:00
hid-speedlink.c HID: Fix Speedlink VAD Cezanne support for some devices 2013-09-26 17:15:34 -07:00
hid-sunplus.c HID: fix a couple of off-by-ones 2014-09-25 11:49:09 +08:00
hid-tivo.c
hid-tmff.c
hid-topseed.c
hid-twinhan.c
hid-uclogic.c
hid-wacom.c
hid-waltop.c
hid-wiimote-core.c
hid-wiimote-debug.c
hid-wiimote-ext.c
hid-wiimote.h
hid-zpff.c HID: zeroplus: validate output report details 2013-10-01 09:10:51 -07:00
hid-zydacron.c
hidraw.c HID: hidraw: correctly deallocate memory on device disconnect 2014-04-14 06:44:19 -07:00
Kconfig
Makefile