RFA: Stop objdump crash on corrupt reloc table
Alan Modra
amodra@bigpond.net.au
Wed Sep 18 00:45:00 GMT 2002
On Tue, Sep 17, 2002 at 12:39:03PM -0400, Daniel Jacobowitz wrote:
> 2002-09-17 Daniel Jacobowitz <drow@mvista.com>
>
> * elfcode.h (elf_slurp_reloc_table_from_section): Add nsyms
> argument. Check for overflow.
> (elf_slurp_reloc_table): Count symbols and pass nsyms to
> elf_slurp_reloc_table_from_section.
Looks OK, except..
> @@ -1510,17 +1519,22 @@ elf_slurp_reloc_table (abfd, asect, symb
> if (relents == NULL)
> return false;
>
> + /* ``symbols'' is NULL-terminated. */
> + nsyms = 0;
> + while (symbols[nsyms] != NULL)
> + nsyms++;
bfd_get_symcount (abfd) ?
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list