Commit 1c9cc3c4 authored by Colin Ian King's avatar Colin Ian King Committed by Todd Kjos
Browse files

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: bc2e15a9 ("HID: playstation: initial DualSense USB support.")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>

Change-Id: I24f4c7f8d48ab8ff1d117d33c7914b8d2e4292f8
(cherry picked from commit 50ab1ffd)
Signed-off-by: default avatarKim Low <kim-huei.low@sony.com>
parent 2dcc66a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment