Fix illegal memory accesses trigeered when linking corrupt input files.
authorNick Clifton <nickc@redhat.com>
Tue, 17 Apr 2018 16:47:51 +0000 (17:47 +0100)
committerNick Clifton <nickc@redhat.com>
Tue, 17 Apr 2018 16:47:51 +0000 (17:47 +0100)
commit808346fcfcff1c3f2471c98e48613afd7bce3679
tree0a0fc7a563dabb064b5db4a2032ecf764e985513
parentc4a91159afa222c1025f1535f42e382b91dc6b73
Fix illegal memory accesses trigeered when linking corrupt input files.

PR 23055
* aoutx.h (find_nearest_line): Check that the symbol name exists
and is long enough, before attempting to see if it is for a .o
file.
* hash.c (bfd_hash_hash): Add an assertion that the string is not
NULL.
* linker.c (bfd_link_hash_lookup): Fail if the table or string are
NULL.
(_bfd_generic_link_add_archive_symbols): Fail if an archive entry
has no name.
bfd/ChangeLog
bfd/aoutx.h
bfd/hash.c
bfd/linker.c