UPSTREAM: HID: playstation: fix array size comparison (off-by-one)
The comparison of value with the array size ps_gamepad_hat_mapping
appears to be off-by-one. Fix this by using >= rather than > for the
size comparison.
Addresses-Coverity: ("Out-of-bounds read")
Fixes: bc2e15a9a022 ("HID: playstation: initial DualSense USB support.")
Signed-off-by:
Colin Ian King <colin.king@canonical.com>
Signed-off-by:
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Bug: 167947264
Change-Id: I24f4c7f8d48ab8ff1d117d33c7914b8d2e4292f8
(cherry picked from commit 50ab1ffd7c41c5c7759b62fb42d3006b751bb12b)
Signed-off-by:
Farid Chahla <farid.chahla@sony.com>
Loading
Please register or sign in to comment