From: Nick Clifton Date: Thu, 14 Mar 2019 16:03:07 +0000 (+0000) Subject: Fix an illegal memory access when parsing a corrupt ELF file. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6cc71b820cc70b63711e9d7f584550b56e172b0a;p=binutils-gdb.git Fix an illegal memory access when parsing a corrupt ELF file. PR 24333 * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL section owner pointer when adding the default symbol. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 447eb707c87..7ed3929c0ae 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2019-03-14 Nick Clifton + + PR 24333 + * elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL + section owner pointer when adding the default symbol. + 2019-03-14 Nick Clifton PR 24332 diff --git a/bfd/elflink.c b/bfd/elflink.c index 3ac58daafda..3413726b947 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -1941,6 +1941,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, { bh = &hi->root; if (bh->type == bfd_link_hash_defined + && bh->u.def.section->owner != NULL && (bh->u.def.section->owner->flags & BFD_PLUGIN) != 0) { /* Mark the previous definition from IR object as