projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0dec63b
)
[PATCH] drivers/input/joystick/spaceorb.c: fix an array overflow
author
Adrian Bunk
<bunk@stusta.de>
Sun, 1 May 2005 15:59:30 +0000
(08:59 -0700)
committer
Linus Torvalds
<torvalds@ppc970.osdl.org>
Sun, 1 May 2005 15:59:30 +0000
(08:59 -0700)
This patch fixes an array overflow found by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/input/joystick/spaceorb.c
patch
|
blob
|
history
diff --git
a/drivers/input/joystick/spaceorb.c
b/drivers/input/joystick/spaceorb.c
index c76cf8ff29c0df6d1617eb8bd0dae2d15671e516..874367bfab0860c4f389544f3039481c5875c82d 100644
(file)
--- a/
drivers/input/joystick/spaceorb.c
+++ b/
drivers/input/joystick/spaceorb.c
@@
-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;