315350b Fix seg fault objdumping a corrupt binary with an invalid sh_link field.

Authored and Committed by nickc 8 years ago
    Fix seg fault objdumping a corrupt binary with an invalid sh_link field.
    
    	PR binutils/20063
    	* elf.c (bfd_elf_get_elf_syms): Check for out of range sh_link
    	field before accessing sections array.
    
    	* readelf.c (get_32bit_section_headers): Warn if an out of range
    	sh_link or sh_info field is encountered.
    	(get_64bit_section_headers): Likewise.
    
        
file modified
+6 -0
file modified
+11 -5
file modified
+7 -0
file modified
+8 -0