diff options
author | Alan Modra <amodra@gmail.com> | 2019-11-19 07:29:26 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2019-11-19 07:35:05 +1030 |
commit | 94698d0198f4018b2ac248b248868cb7a5c0cc43 (patch) | |
tree | fe373cc4fe81bf04f1ab0171a8ec236444c79768 /bfd/elf.c | |
parent | 2e953acac2ef45afa10e0b2c4c6c23fb52718a26 (diff) | |
download | gdb-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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |