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)
committersungmin ha <sungmin82.ha@samsung.com>
Wed, 18 Mar 2015 05:13:55 +0000 (14:13 +0900)
commit705dda1f12fd6f59070810a3aef4ceb05bc31bea
tree4820238d69f9f4082d87eca5c3d6fa3f9d793028
parent37aba977d3b69d8f8debb0529e84e65796981f74
HID: picolcd: sanity check report size in raw_event() callback

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.

Change-Id: Ibd5c252847759aace11973bc143651a5dc3bf931
Cc: stable@vger.kernel.org
Reported-by: Steven Vittitoe <scvitti@google.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-picolcd_core.c