Skip to contentSkip to conversation

drivers/input/joystick/spaceorb.c: fix an array overflow

PATCH New Adrian Bunk 1 participant 1 message Apr 9, 2005 Input drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/input/joystick/spaceorb.c: fix an array overflow

This patch fixes an array overflow found by the Coverity checker.

---

This patch was already sent on:
- 27 Mar 2005

drivers/input/joystick/spaceorb.c renamed from drivers/input/joystick/spaceorb.c.old +1 -1
@@ -116,7 +116,7 @@ static void spaceorb_process_packet(stru
 
 		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;