diff options
author | Alan Modra <amodra@gmail.com> | 2020-04-24 09:51:38 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-04-24 10:52:26 +0930 |
commit | 2482f30615136c7ed2082561f8e9dba48ee3ee25 (patch) | |
tree | df3f56c4b291b8997174c1eceb7c8e0526b6babc /binutils/ChangeLog | |
parent | 5e5bbc7e7917e23068a1b0bba381d125b5c9c7c1 (diff) | |
download | gdb-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 'binutils/ChangeLog')
-rw-r--r-- | binutils/ChangeLog | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 7f7e340..ad3846a 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,12 @@ +2020-04-24 Alan Modra <amodra@gmail.com> + + * 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. + 2020-04-23 Anton Kolesov <anton.kolesov@synopsys.com> * elf-bfd.h (elfcore_write_arc_v2): Add prototype. |