Skip to content
Snippets Groups Projects
  • Alan Modra's avatar
    c8b3d02c
    objdump segfault after symbol table error · c8b3d02c
    Alan Modra authored
    This memcpy segfaults if symcount is -1 (=> syms is NULL).
          memcpy (sorted_syms, symcount ? syms : dynsyms,
    	      sorted_symcount * sizeof (asymbol *));
    
    	* objdump.c (slurp_symtab): Don't leave symcount as -1 after
    	an error.
    	(slurp_dynamic_symtab): Likewise for dynsymcount.
    c8b3d02c
    History
    objdump segfault after symbol table error
    Alan Modra authored
    This memcpy segfaults if symcount is -1 (=> syms is NULL).
          memcpy (sorted_syms, symcount ? syms : dynsyms,
    	      sorted_symcount * sizeof (asymbol *));
    
    	* objdump.c (slurp_symtab): Don't leave symcount as -1 after
    	an error.
    	(slurp_dynamic_symtab): Likewise for dynsymcount.