From mboxrd@z Thu Jan 1 00:00:00 1970 From: Frank Mori Hess Date: Fri, 15 Oct 2004 02:01:34 +0000 Subject: fxload fix Message-Id: <200410142203.26658.fmhess@users.sourceforge.net> MIME-Version: 1 Content-Type: multipart/mixed; boundary="Boundary-00=_b+ybBv0OXckQSSY" List-Id: To: linux-hotplug@vger.kernel.org --Boundary-00=_b+ybBv0OXckQSSY Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 --Boundary-00=_b+ybBv0OXckQSSY Content-Type: text/x-diff; charset="us-ascii"; name="ezusb_diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ezusb_diff" --- 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; } --Boundary-00=_b+ybBv0OXckQSSY Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I've got a one-line patch attached for fxload. Without it, it chokes on=20 Intel hex image files, unless you add a garbage character to the end of=20 every line. I suppose using DOS instead of UNIX end of line characters in= =20 the firmware file would also avoid the bug. =2D --=20 =46rank =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBby9+5vihyNWuA4URAlOJAKDpmCPfkYXNjF/1JRDyg0g7leJaDgCgxKSh Ow5I6aPZvFCF+3yat1h7Rpk=3D =3Dt1G5 =2D----END PGP SIGNATURE----- --Boundary-00=_b+ybBv0OXckQSSY Content-Type: text/x-diff; charset="us-ascii"; name="ezusb_diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ezusb_diff" --- 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; } --Boundary-00=_b+ybBv0OXckQSSY-- ---- ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel -------