diff options
Diffstat (limited to 'bfd/elf32-i960.c')
-rw-r--r-- | bfd/elf32-i960.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bfd/elf32-i960.c b/bfd/elf32-i960.c index c6fbbb8..1ac89c3 100644 --- a/bfd/elf32-i960.c +++ b/bfd/elf32-i960.c @@ -132,7 +132,13 @@ elf32_i960_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, enum elf_i960_reloc_type type; type = (enum elf_i960_reloc_type) ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (type < R_960_max); + + /* PR 17521: file: 9609b8d6. */ + if (type >= R_960_max) + { + _bfd_error_handler (_("%A; invalid i960 reloc number: %d"), abfd, type); + type = 0; + } cache_ptr->howto = &elf_howto_table[(int) type]; } |