]> git.baikalelectronics.ru Git - kernel.git/commit
HID: sony: Perform a boundry check on the sixaxis battery level index.
authorFrank Praznik <frank.praznik@oh.rr.com>
Thu, 20 Feb 2014 16:36:02 +0000 (11:36 -0500)
committerJiri Kosina <jkosina@suse.cz>
Mon, 24 Feb 2014 16:38:46 +0000 (17:38 +0100)
commit2a2e8a7f9515a1b50116947e2a42931ac889e1cc
tree359fe7bb4da2918428b687ce89311f201c560962
parent5e34276ff27507f5e9af8cd108a3fe5757d97204
HID: sony: Perform a boundry check on the sixaxis battery level index.

Make sure that an out-of-bounds read doesn't occur in the Sixaxis battery level
lookup table in the event that the controller sends an invalid battery status
value in the report.

Signed-off-by: Frank Praznik <frank.praznik@oh.rr.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c