Input: gtco - fix uninitialized stack read
Subsystems (2)
PATCH 1/1 Input: gtco - fix uninitialized stack read
If a malformed HID report is sent from the device, a prefix with TYPE_MAIN may read globtype before it is written with TYPE_GLOBAL.
The oldval array is protected from uninitialized read by the indent counter.
Reported-by [email protected]
Signed-off-by Paul Hollinsky <[email protected]>
--- drivers/input/tablet/gtco.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/input/tablet/gtco.c +1 -1
@@ -217,7 +217,7 @@ static void parse_hid_report_descriptor(struct gtco *device, char * report,__u32 usage =0 ;/* Global Values, indexed by TAG */ -__u32 globalval[TAG_GLOB_MAX ]; +__u32 globalval[TAG_GLOB_MAX ] = {0 };__u32 oldval[TAG_GLOB_MAX ];/* Debug stuff */
Signature · 1 line
2.25.1