Skip to contentSkip to conversation

fxload fix

PATCH Frank Mori Hess 1 participant 1 message Oct 15, 2004

lore
Share & tools
lore
#0 lore raw

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

ezusb-fixed.c renamed from ezusb.c +1 -1
@@ -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;
 	}

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

ezusb-fixed.c renamed from ezusb.c +1 -1
@@ -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;
 	}