public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] in drivers/char/joystick/magellan.c
@ 2003-01-28 15:53 Jörn Engel
  2003-01-28 15:57 ` Vojtech Pavlik
  2003-01-28 17:57 ` Martin Mares
  0 siblings, 2 replies; 9+ messages in thread
From: Jörn Engel @ 2003-01-28 15:53 UTC (permalink / raw)
  To: Vojtech Pavlik; +Cc: linux-kernel

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])

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-01-29 16:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-28 15:53 [BUG] in drivers/char/joystick/magellan.c Jörn Engel
2003-01-28 15:57 ` Vojtech Pavlik
2003-01-28 15:59   ` Jörn Engel
2003-01-29 13:59   ` Horst von Brand
2003-01-28 17:57 ` Martin Mares
2003-01-28 18:10   ` Jörn Engel
2003-01-28 18:47   ` Randy.Dunlap
2003-01-28 21:03     ` Vojtech Pavlik
2003-01-29 12:25       ` Jörn Engel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox