OSDN Git Service

greybus: hid: fix missing input verification of report events
authorJohan Hovold <johan@hovoldconsulting.com>
Fri, 27 Mar 2015 11:45:47 +0000 (12:45 +0100)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 30 Mar 2015 13:20:33 +0000 (15:20 +0200)
commit382145beb4a4bb057f17d5b411546b6b56fbacd1
tree7ee653e71ac9ac14e43275669eb4d7aa466231d1
parent36257f6b4e7671cb12f98d91a6ffdeabdc254d0c
greybus: hid: fix missing input verification of report events

Add minimal verification of incoming report size, before using it to
determine what buffer and size to pass on to HID core.

Add comment about protocol needing to be revisited. If we are going to
be parsing the report data received, then those fields have to be
defined in the Greybus specification at least.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/hid.c