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: [committed, PATCH] Check file size before getting section contents


On 06/26/2017 11:24 PM, Pedro Alves wrote:

> The problem is this new "section->filepos + offset + sz"
> check here.  GDB calls bfd_get_section_contents with offset != 0,
> which causes that "offset + sz" addition to shoot past filesz.
> I can't see how that new check makes sense as is.  We're reading
> "count" bytes, not "sz" bytes.
> 
> I'm testing this.

Testing gas+ld+gdb passed.  I've pushed it in.

Thanks,
Pedro Alves


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