HID: logitech-dj: check report length
authorPeter Wu <peter@lekensteyn.nl>
Tue, 16 Dec 2014 15:55:21 +0000 (16:55 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 17 Dec 2014 07:50:12 +0000 (08:50 +0100)
commitf254ae938ea479739572790a4e9b0ca86d16249f
treeba6bc66d182876f716c6cfe9a4f8a1e9a0202add
parent0349678ccd74d16c1f2bb58ecafec13ef7110e36
HID: logitech-dj: check report length

Malicious USB devices can send bogus reports smaller than the expected
buffer size. Ensure that the length is valid to avoid reading out of
bounds.

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-dj.c