Skip to content
Commit c33ea119 authored by Alan Modra's avatar Alan Modra
Browse files

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.
parent 3ef23ee9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment