linux/drivers/hid/hid-debug.c
Daniel Rosenberg e44ab03f41 HID: debug: check length before copy_to_user()
commit 717adfdaf1 upstream.

If our length is greater than the size of the buffer, we
overflow the buffer

Signed-off-by: Daniel Rosenberg <drosen@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2018-10-03 04:10:08 +01:00

1255 lines
41 KiB