All of lore.kernel.org
 help / color / mirror / Atom feed
* fxload fix
@ 2004-10-15  2:01 Frank Mori Hess
  0 siblings, 0 replies; only message in thread
From: Frank Mori Hess @ 2004-10-15  2:01 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 283 bytes --]

Hi,

I've got a one-line patch attached for fxload.  Without it, it chokes on 
Intel hex image files, unless you add a garbage character to the end of 
every line.  I suppose using DOS instead of UNIX end of line characters in 
the firmware file would also avoid the bug.

--
Frank


[-- Attachment #2: ezusb_diff --]
[-- Type: text/x-diff, Size: 290 bytes --]

--- ezusb.c	2004-10-14 21:39:41.000000000 -0400
+++ ezusb-fixed.c	2004-10-14 21:40:27.000000000 -0400
@@ -361,7 +361,7 @@
 	    return -3;
 	}
 
-	if ((len * 2) + 11 >= strlen(buf)) {
+	if ((len * 2) + 11 > strlen(buf)) {
 	    fprintf (stderr, "record too short?\n");
 	    return -4;
 	}

[-- Attachment #3: Type: Text/Plain, Size: 542 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've got a one-line patch attached for fxload.  Without it, it chokes on 
Intel hex image files, unless you add a garbage character to the end of 
every line.  I suppose using DOS instead of UNIX end of line characters in 
the firmware file would also avoid the bug.

- -- 
Frank

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBby9+5vihyNWuA4URAlOJAKDpmCPfkYXNjF/1JRDyg0g7leJaDgCgxKSh
Ow5I6aPZvFCF+3yat1h7Rpk=
=t1G5
-----END PGP SIGNATURE-----

[-- Attachment #4: ezusb_diff --]
[-- Type: text/x-diff, Size: 290 bytes --]

--- ezusb.c	2004-10-14 21:39:41.000000000 -0400
+++ ezusb-fixed.c	2004-10-14 21:40:27.000000000 -0400
@@ -361,7 +361,7 @@
 	    return -3;
 	}
 
-	if ((len * 2) + 11 >= strlen(buf)) {
+	if ((len * 2) + 11 > strlen(buf)) {
 	    fprintf (stderr, "record too short?\n");
 	    return -4;
 	}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-15  2:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-15  2:01 fxload fix Frank Mori Hess

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.