readelf: NULL dereference
authorAlan Modra <amodra@gmail.com>
Sun, 26 Apr 2020 09:00:50 +0000 (18:30 +0930)
committerAlan Modra <amodra@gmail.com>
Sun, 26 Apr 2020 14:20:18 +0000 (23:50 +0930)
commit90837ea7211e7911ca6c729c2dd697b35a1054ad
treedbdaa80baf63732886a2bb797f741942fad09912
parentbc3609fd3891c1cc0007eccd74bca98aabc03996
readelf: NULL dereference

This fixes another missing error check.

* readelf.c (get_num_dynamic_syms): Check DT_MIPS_XHASH was
read before dereferencing, and gracefully return.  Remove
gnu_hash_error variable.  Free gnu hash arrays if number of
syms found is zero.
binutils/ChangeLog
binutils/readelf.c