aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-mep.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elf32-mep.c')
-rw-r--r--bfd/elf32-mep.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/bfd/elf32-mep.c b/bfd/elf32-mep.c
index 548359f..600a60d 100644
--- a/bfd/elf32-mep.c
+++ b/bfd/elf32-mep.c
@@ -400,6 +400,11 @@ mep_info_to_howto_rela
unsigned int r_type;
r_type = ELF32_R_TYPE (dst->r_info);
+ if (r_type >= R_MEP_max)
+ {
+ _bfd_error_handler (_("%A: invalid MEP reloc number: %d"), abfd, r_type);
+ r_type = 0;
+ }
cache_ptr->howto = & mep_elf_howto_table [r_type];
}