Package: fxload
Version: 0.0.20020411-1
Severity: normal
Tags: patch
The "fxload" program exits if it encounters an unknown record type in
the hex file, such as types 2, 3, 4, 5. Programs like srec_cat create
these, and they can be safely ignored in many cases. The below
patch lets fxload warn but continue after encountering and unknown
record.
-jim
diff -urN fxload-0.0.20020411.orig/ezusb.c fxload-0.0.20020411/ezusb.c
--- fxload-0.0.20020411.orig/ezusb.c 2007-07-10 17:44:54.000000000 -0400
+++ fxload-0.0.20020411/ezusb.c 2007-07-10 17:46:12.000000000 -0400
@@ -357,8 +357,8 @@
}
if (type != 0) {
- fprintf (stderr, "unsupported record type: %u\n", type);
- return -3;
+ fprintf (stderr, "ignoring unsupported record type: %u\n", type);
+ continue;
}
if ((len * 2) + 11 >= strlen(buf)) {
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.21-2-686
Locale: LANG=POSIX, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages fxload depends on:
ii libc6 2.5-9+b1 GNU C Library: Shared libraries
fxload recommends no packages.
-- no debconf information
Acknowledgement sent
to Tzafrir Cohen <[email protected]>:
Extra info received and forwarded to list. Copy sent to Fumitoshi UKAI <[email protected]>.
(Tue, 03 Nov 2009 22:30:07 GMT) (full text, mbox, link).
Subject: Re: #432607: fxload could ignore unknown record types
Date: Tue, 3 Nov 2009 22:09:19 +0000
Long ago, on Tue, 10 Jul 2007 17:56:15 -0400, Jim Paris wrote:
> The "fxload" program exits if it encounters an unknown record type in
> the hex file, such as types 2, 3, 4, 5. Programs like srec_cat create
> these, and they can be safely ignored in many cases. The below
> patch lets fxload warn but continue after encountering and unknown
> record.
But in many other cases this may hide a badly-formatted file. Not to
mention that for many uses ignoring those other address types is plain
wrong.
Add an extra command-line switch for than? What should be the default?
--
Tzafrir Cohen | [email protected] | VIM is
http://tzafrir.org.il | | a Mutt's
[email protected] | | best
ICQ# 16849754 | | friend
Debbugs is free software and licensed under the terms of the GNU General
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.