ANDROID: HID: debug: check length in hid_debug_events_read() before copy_to_user()

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

Change-Id: I113a1955a2bac83c83084d5cd28d886175673219
Bug: 71361580
Signed-off-by: Daniel Rosenberg <drosen@google.com>
CVE-2018-9516
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
1 file changed