This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Check S-record with 0 size
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Binutils <binutils at sourceware dot org>
- Date: Fri, 29 Aug 2014 08:06:28 -0700
- Subject: Re: PATCH: Check S-record with 0 size
- Authentication-results: sourceware.org; auth=none
- References: <20140828152534 dot GA4435 at intel dot com> <20140829011514 dot GH15716 at bubble dot grove dot modra dot org>
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.