[committed, PATCH] Check file size before getting section contents
Pedro Alves
palves@redhat.com
Mon Jun 26 23:26:00 GMT 2017
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
More information about the Binutils
mailing list