summaryrefslogtreecommitdiffstats
path: root/drivers/input
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2005-05-01 08:59:30 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 08:59:30 -0700
commit6c207e769297946a0adec45225c6999f1299dde3 (patch)
tree2e4890b150d6f7055b2ecda3600df04c28d8bfb6 /drivers/input
parent0dec63bab860cc60cc444faa0ac459f1b53545ff (diff)
downloadlinux-6c207e769297946a0adec45225c6999f1299dde3.tar.gz
linux-6c207e769297946a0adec45225c6999f1299dde3.tar.bz2
linux-6c207e769297946a0adec45225c6999f1299dde3.zip
[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 <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/joystick/spaceorb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/joystick/spaceorb.c b/drivers/input/joystick/spaceorb.c
index c76cf8ff29c0..874367bfab08 100644
--- 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;