diff options
author | Nick Clifton <nickc@redhat.com> | 2019-03-14 16:03:07 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2019-03-14 16:03:07 +0000 |
commit | 6cc71b820cc70b63711e9d7f584550b56e172b0a (patch) | |
tree | 2dba1c342271b8d6893e2d6d3b1e6898a78827fb /bfd | |
parent | 3fff2c370cd658877be8107bfe9dde8dd0470b46 (diff) | |
download | gdb-6cc71b820cc70b63711e9d7f584550b56e172b0a.zip gdb-6cc71b820cc70b63711e9d7f584550b56e172b0a.tar.gz gdb-6cc71b820cc70b63711e9d7f584550b56e172b0a.tar.bz2 |
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.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elflink.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 447eb70..7ed3929 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 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 * elflink.c (elf_link_add_object_symbols): Add new local variable extversym_end. Initialise it to point to the end of the version diff --git a/bfd/elflink.c b/bfd/elflink.c index 3ac58da..3413726 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 |