PATCH: Check S-record with 0 size

H.J. Lu hjl.tools@gmail.com
Fri Aug 29 15:06:00 GMT 2014


On Thu, Aug 28, 2014 at 6:15 PM, Alan Modra <amodra@gmail.com> wrote:
> On Thu, Aug 28, 2014 at 08:25:34AM -0700, H.J. Lu wrote:
>> Hi,
>>
>> I checked in this patch to fix S-record with 0 size reported at
>>
>> http://lists.gnu.org/archive/html/bug-binutils/2014-08/msg00110.html
>
> We should really be testing for other invalid byte counts.
>
>         * srec.c (srec_scan): Revert last change.  Report an error for
>         S-records with less than the miniumum byte count.
>

I don't think it is desirable.  For the given testcase, now we got

[hjl@gnu-6 binutils]$ ./strings /tmp/ohcrap.txt
BFD: /tmp/ohcrap.txt:1: byte count 0 too small

S700
[hjl@gnu-6 binutils]$

We should generate

[hjl@gnu-6 binutils]$ ./strings /tmp/ohcrap.txt
S700
[hjl@gnu-6 binutils]$

-- 
H.J.



More information about the Binutils mailing list