diff options
Diffstat (limited to 'bfd/elf32-cr16c.c')
-rw-r--r-- | bfd/elf32-cr16c.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/bfd/elf32-cr16c.c b/bfd/elf32-cr16c.c index cf4503c..d8333e1 100644 --- a/bfd/elf32-cr16c.c +++ b/bfd/elf32-cr16c.c @@ -180,7 +180,11 @@ elf_cr16c_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, { unsigned int r_type = ELF32_R_TYPE (dst->r_info); - BFD_ASSERT (r_type < (unsigned int) RINDEX_16C_MAX); + if (r_type >= RINDEX_16C_MAX) + { + _bfd_error_handler (_("%A; invalid CR16C reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &elf_howto_table[r_type]; } |