Messages in this thread Patch in this message |  | | Date | Tue, 28 Jan 2003 16:53:12 +0100 | From | Jörn Engel <> | Subject | [BUG] in drivers/char/joystick/magellan.c |
| |
Hi!
Without the patch below, the \0 terminating the string is written anywhere. nibbles[] would be even better, I guess. Can you check for stupidity on my side?
Jörn
-- But this is not to say that the main benefit of Linux and other GPL software is lower-cost. Control is the main benefit--cost is secondary. -- Bruce Perens
diff -Naur linux-2.4.21-pre3-ac4/drivers/char/joystick/magellan.c scratch/drivers/char/joystick/magellan.c --- linux-2.4.21-pre3-ac4/drivers/char/joystick/magellan.c Thu Sep 13 00:34:06 2001 +++ scratch/drivers/char/joystick/magellan.c Mon Jan 27 13:49:54 2003 @@ -66,7 +66,7 @@ static int magellan_crunch_nibbles(unsigned char *data, int count) { - static unsigned char nibbles[16] = "0AB3D56GH9:K<MN?"; + static unsigned char nibbles[17] = "0AB3D56GH9:K<MN?"; do { if (data[count] == nibbles[data[count] & 0xf]) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|  |