HID: picolcd: sanity check report size in raw_event() callback
authorJiri Kosina <jkosina@suse.cz>
Wed, 27 Aug 2014 07:13:15 +0000 (09:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 5 Oct 2014 21:52:11 +0000 (14:52 -0700)
commit2c40d59997ed0b885ac31862e21cb5b84a3e7dca
tree7d799be5faafdc9e01610793173384ab21664c53
parent63ea55d4d127fa2d544d26a807a9721cf8f650ab
HID: picolcd: sanity check report size in raw_event() callback

commit 844817e47eef14141cf59b8d5ac08dd11c0a9189 upstream.

The report passed to us from transport driver could potentially be
arbitrarily large, therefore we better sanity-check it so that raw_data
that we hold in picolcd_pending structure are always kept within proper
bounds.

Reported-by: Steven Vittitoe <scvitti@google.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-picolcd_core.c