This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Check S-record with 0 size


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]