]> 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)
commit543acc2a24c9f1e39a28254be7d5b1f723457f86
tree0d86115c4a291314da2f6ddb52521cba9c782d43
parent4b6308fb5e2064464a287f2483db08c0c65f4f75
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