diff options
Diffstat (limited to 'bfd/elf32-visium.c')
-rw-r--r-- | bfd/elf32-visium.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elf32-visium.c b/bfd/elf32-visium.c index a77b677..eae6709 100644 --- a/bfd/elf32-visium.c +++ b/bfd/elf32-visium.c @@ -501,6 +501,11 @@ visium_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, break; default: + if (r_type >= (unsigned int) R_VISIUM_max) + { + _bfd_error_handler (_("%A: invalid Visium reloc number: %d"), abfd, r_type); + r_type = 0; + } cache_ptr->howto = &visium_elf_howto_table[r_type]; break; } |