aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-11-19 07:29:26 +1030
committerAlan Modra <amodra@gmail.com>2019-11-19 07:35:05 +1030
commit94698d0198f4018b2ac248b248868cb7a5c0cc43 (patch)
treefe373cc4fe81bf04f1ab0171a8ec236444c79768 /bfd/elf.c
parent2e953acac2ef45afa10e0b2c4c6c23fb52718a26 (diff)
downloadgdb-94698d0198f4018b2ac248b248868cb7a5c0cc43.zip
gdb-94698d0198f4018b2ac248b248868cb7a5c0cc43.tar.gz
gdb-94698d0198f4018b2ac248b248868cb7a5c0cc43.tar.bz2
PR25200, SIGSEGV in _bfd_elf_validate_reloc
PR 25200 * reloc.c (bfd_default_reloc_type_lookup): Don't BFD_FAIL. * elf.c (_bfd_elf_validate_reloc): Don't segfault on NULL howto.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 88e51c4..a221bf0 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -9222,7 +9222,7 @@ _bfd_elf_validate_reloc (bfd *abfd, arelent *areloc)
howto = bfd_reloc_type_lookup (abfd, code);
- if (areloc->howto->pcrel_offset != howto->pcrel_offset)
+ if (howto && areloc->howto->pcrel_offset != howto->pcrel_offset)
{
if (howto->pcrel_offset)
areloc->addend += areloc->address;