Fix problem with linker created sections being mistakenly flagged
as corrupt by the new error checking code in bfd_get_full_section_contents. PR binutils/17512 * compress.c (bfd_get_full_section_contents): Improve test for linker created objects.
This commit is contained in:
parent
e0a31db1b1
commit
79f2a78e76
@ -1,5 +1,9 @@
|
|||||||
2014-11-04 Nick Clifton <nickc@redhat.com>
|
2014-11-04 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR binutils/17512
|
||||||
|
* compress.c (bfd_get_full_section_contents): Improve test for
|
||||||
|
linker created objects.
|
||||||
|
|
||||||
PR binutils/17533
|
PR binutils/17533
|
||||||
* archive.c (_bfd_slurp_extended_name_table): Handle archives with
|
* archive.c (_bfd_slurp_extended_name_table): Handle archives with
|
||||||
corrupt extended name tables.
|
corrupt extended name tables.
|
||||||
|
@ -179,8 +179,9 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr)
|
|||||||
case COMPRESS_SECTION_NONE:
|
case COMPRESS_SECTION_NONE:
|
||||||
/* PR binutils/17512: Avoid malloc or file reading errors due to
|
/* PR binutils/17512: Avoid malloc or file reading errors due to
|
||||||
ridiculous section sizes. But ignore linker created objects
|
ridiculous section sizes. But ignore linker created objects
|
||||||
with no contents (yet). */
|
and bfds with no contents (yet). */
|
||||||
if (bfd_get_size (abfd) > 0
|
if (bfd_get_size (abfd) > 0
|
||||||
|
&& (sec->flags & SEC_LINKER_CREATED) == 0
|
||||||
&& sz > (bfd_size_type) bfd_get_size (abfd))
|
&& sz > (bfd_size_type) bfd_get_size (abfd))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user