PR26475 UBSAN: elfxx-mips.c:12180 null pointer memset

Another memset(0,0,0)

	PR 26475
	* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Check
	sstubs->contents != NULL.
This commit is contained in:
Alan Modra 2020-08-26 18:22:07 +09:30
parent 1673aff569
commit 55e61b8ad9
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2020-08-26 Alan Modra <amodra@gmail.com>
PR 26475
* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Check
sstubs->contents != NULL.
2020-08-26 Alan Modra <amodra@gmail.com>
PR 26453

View File

@ -12172,7 +12172,8 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd,
s->contents));
/* Clean up a dummy stub function entry in .text. */
if (htab->sstubs != NULL)
if (htab->sstubs != NULL
&& htab->sstubs->contents != NULL)
{
file_ptr dummy_offset;