aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-04-24 09:51:38 +0930
committerAlan Modra <amodra@gmail.com>2020-04-24 10:52:26 +0930
commit2482f30615136c7ed2082561f8e9dba48ee3ee25 (patch)
treedf3f56c4b291b8997174c1eceb7c8e0526b6babc /gdb/testsuite/lib
parent5e5bbc7e7917e23068a1b0bba381d125b5c9c7c1 (diff)
downloadgdb-2482f30615136c7ed2082561f8e9dba48ee3ee25.zip
gdb-2482f30615136c7ed2082561f8e9dba48ee3ee25.tar.gz
gdb-2482f30615136c7ed2082561f8e9dba48ee3ee25.tar.bz2
readelf: memory leaks in process_dynamic_section
This fixes some code that assumed only one PT_LOAD would contain DT_SYMTAB. Which is normally the case, but fuzzers thoroughly mess with object files. * readelf.c (get_num_dynamic_syms): Check for nbuckets and nchains non-zero. (process_dynamic_section): Call get_num_dynamic_syms once rather than in segment loop. Break out of segment loop on a successful load of dynamic symbols. Formatting. (process_object): Return error status from process_dynamic_section.
Diffstat (limited to 'gdb/testsuite/lib')
0 files changed, 0 insertions, 0 deletions