diff options
author | Alan Modra <amodra@gmail.com> | 2024-02-07 12:29:12 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2024-02-07 21:29:07 +1030 |
commit | c33ea119b1a5cca79f9efc0a6d5603667954358d (patch) | |
tree | a47ce94882f1143149f85c94b916710cf0b1823a /gdb/cli/cli-script.c | |
parent | 3ef23ee92631014b6e72e63aa0d6ecc467392546 (diff) | |
download | binutils-c33ea119b1a5cca79f9efc0a6d5603667954358d.zip binutils-c33ea119b1a5cca79f9efc0a6d5603667954358d.tar.gz binutils-c33ea119b1a5cca79f9efc0a6d5603667954358d.tar.bz2 |
asan: NULL dereference in _bfd_mips_final_write_processing
Fuzzed object files can easily have unexpected section names. We
don't want to segfault on objcopy of any file accepted by the mips
object_p functions. For objcopy, an assertion that "sec" is non-NULL
followed by deferencing "sec" is wrong. So too is asserting that the
section name string starts with a particular prefix, and then blithely
accessing past the assumed prefix.
* elfxx-mips.c (_bfd_mips_final_write_processing): Replace
assertions with conditionals. Don't bother testing for name
non-NULL.
Diffstat (limited to 'gdb/cli/cli-script.c')
0 files changed, 0 insertions, 0 deletions