Fix an illegal memory access when parsing a corrupt ELF file.
authorNick Clifton <nickc@redhat.com>
Thu, 14 Mar 2019 16:03:07 +0000 (16:03 +0000)
committerNick Clifton <nickc@redhat.com>
Thu, 14 Mar 2019 16:03:07 +0000 (16:03 +0000)
PR 24333
* elflink.c (_bfd_elf_add_default_symbol): Add a check for a NULL
section owner pointer when adding the default symbol.

bfd/ChangeLog
bfd/elflink.c

index 447eb707c877399943c8913826c88979dbf614dc..7ed3929c0aedc8d1a85302f7a500a871e2741116 100644 (file)
@@ -1,3 +1,9 @@
+2019-03-14  Nick Clifton  <nickc@redhat.com>
+
+       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  <nickc@redhat.com>
 
        PR 24332
index 3ac58daafda812d1db60999691e47217c2c15621..3413726b94785260ff9af1271ec8514c489aaf76 100644 (file)
@@ -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
This page took 0.030228 seconds and 4 git commands to generate.