From: Alan Modra Date: Wed, 26 Aug 2020 08:52:07 +0000 (+0930) Subject: PR26475 UBSAN: elfxx-mips.c:12180 null pointer memset X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=55e61b8ad977cba772753c8dbba5c81f6b1fa54c;p=binutils-gdb.git 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. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 20a02d9238f..3a85c3eb9a5 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2020-08-26 Alan Modra + + PR 26475 + * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Check + sstubs->contents != NULL. + 2020-08-26 Alan Modra PR 26453 diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index fda653e1afc..bc0843508e0 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -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;