]> git.karo-electronics.de Git - karo-tx-linux.git/commit
greybus: hid: fix null-deref on short report requests
authorJohan Hovold <johan@hovoldconsulting.com>
Fri, 27 Mar 2015 11:45:46 +0000 (12:45 +0100)
committerGreg Kroah-Hartman <greg@kroah.com>
Mon, 30 Mar 2015 13:20:33 +0000 (15:20 +0200)
commit36257f6b4e7671cb12f98d91a6ffdeabdc254d0c
tree0c0235e29113ccac6e050083eecbf99915d316d4
parentecf47ab9c5ca1427baea7ab6d3226502d967f19d
greybus: hid: fix null-deref on short report requests

Make sure to verify the length of incoming requests before trying to
parse the request buffer, which can even be NULL on empty requests.

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