diff options
author | Nick Clifton <nickc@redhat.com> | 2000-07-21 19:56:19 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2000-07-21 19:56:19 +0000 |
commit | 7a3120d9a6092b9029231894f8ba1f7620fc6c87 (patch) | |
tree | b637b8634b5cfd4d050f7e39b8b61740f356556a /bfd/elf32-mips.c | |
parent | 0b5e1ab5253d534e171ee047dfa14b451c1597a3 (diff) | |
download | gdb-7a3120d9a6092b9029231894f8ba1f7620fc6c87.zip gdb-7a3120d9a6092b9029231894f8ba1f7620fc6c87.tar.gz gdb-7a3120d9a6092b9029231894f8ba1f7620fc6c87.tar.bz2 |
Detect and report corrupt relocs
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r-- | bfd/elf32-mips.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 27ae18a..f6a60ba 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -7593,6 +7593,13 @@ _bfd_mips_elf_check_relocs (abfd, info, sec, relocs) if (r_symndx < extsymoff) h = NULL; + else if (r_symndx >= extsymoff + (symtab_hdr->sh_size / symtab_hdr->sh_entsize)) + { + (*_bfd_error_handler) + (_("Malformed reloc detected for section %s"), name); + bfd_set_error (bfd_error_bad_value); + return false; + } else { h = sym_hashes[r_symndx - extsymoff]; |