* elf.c (bfd_section_from_shdr): Fail if sh_entsize is bogus for

symbol, relocation, group or versym sections.

	* coffcode.h (coff_slurp_reloc_table): Don't crash if native_relocs
	is NULL.
	* peXXigen.c (pe_print_idata): Don't crash if dll_name or start_address
	doesn't point into the section.
This commit is contained in:
Jakub Jelinek 2005-06-17 13:39:56 +00:00
parent 08d8fa1187
commit a50b216054
4 changed files with 38 additions and 8 deletions

View file

@ -4830,7 +4830,7 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols)
amt = (bfd_size_type) asect->reloc_count * sizeof (arelent);
reloc_cache = bfd_alloc (abfd, amt);
if (reloc_cache == NULL)
if (reloc_cache == NULL || native_relocs == NULL)
return FALSE;
for (idx = 0; idx < asect->reloc_count; idx++)