1999-07-21 Philippe De Muyter <phdm@macqel.be>

* cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
	message	and fail if a symbol index is out of range.
This commit is contained in:
Ian Lance Taylor 1999-07-22 00:29:35 +00:00
parent 0691c3ca1f
commit 75987f837d
2 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,8 @@
1999-07-21 Philippe De Muyter <phdm@macqel.be>
* cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
message and fail if a symbol index is out of range.
1999-07-21 Ian Lance Taylor <ian@zembu.com>
* elf32-mips.c (mips_elf_calculate_relocation): Get the GP value

View file

@ -2603,6 +2603,14 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
h = NULL;
sym = NULL;
}
else if (symndx < 0
|| (unsigned long) symndx >= obj_raw_syment_count (input_bfd))
{
(*_bfd_error_handler)
("%s: illegal symbol index %ld in relocs",
bfd_get_filename (input_bfd), symndx);
return false;
}
else
{
h = obj_coff_sym_hashes (input_bfd)[symndx];