]> git.baikalelectronics.ru Git - kernel.git/commit
HID: logitech-hidpp: add boundary check for name retrieval
authorPeter Wu <peter@lekensteyn.nl>
Thu, 11 Dec 2014 12:51:19 +0000 (13:51 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 11 Dec 2014 22:10:00 +0000 (23:10 +0100)
commit5728c39f68843a42344c0d125cc20e6b016b9320
tree0d86115c4a291314da2f6ddb52521cba9c782d43
parenta4282e9179a7984f59a68d9a6dadfbe5ec72d47f
HID: logitech-hidpp: add boundary check for name retrieval

The HID response has a limited size. Do not trust the value returned by
hardware, check that it really fits in the message.

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-logitech-hidpp.c