This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: RFA: Stop objdump crash on corrupt reloc table
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sources dot redhat dot com
- Date: Wed, 18 Sep 2002 11:20:11 +0930
- Subject: Re: RFA: Stop objdump crash on corrupt reloc table
- References: <20020917163903.GA31004@nevyn.them.org>
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