mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[PATCH] drivers/input/joystick/spaceorb.c: fix an array overflow
This patch fixes an array overflow found by the Coverity checker. Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
0dec63bab8
commit
6c207e7692
1 changed files with 1 additions and 1 deletions
|
|
@ -116,7 +116,7 @@ static void spaceorb_process_packet(struct spaceorb *spaceorb, struct pt_regs *r
|
|||
|
||||
case 'K': /* Button data */
|
||||
if (spaceorb->idx != 5) return;
|
||||
for (i = 0; i < 7; i++)
|
||||
for (i = 0; i < 6; i++)
|
||||
input_report_key(dev, spaceorb_buttons[i], (data[2] >> i) & 1);
|
||||
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue