segfault in objdump.c reloc_at
bfd_canonicalize_reloc returns -1L on errors. * objdump.c (load_specific_debug_section): Properly handle error return from bfd_canonicalize_reloc.
This commit is contained in:
parent
b8d97d3857
commit
4d664d5711
1 changed files with 2 additions and 2 deletions
|
@ -4212,13 +4212,13 @@ load_specific_debug_section (enum dwarf_section_display_enum debug,
|
|||
|
||||
if (reloc_size > 0)
|
||||
{
|
||||
unsigned long reloc_count;
|
||||
long reloc_count;
|
||||
arelent **relocs;
|
||||
|
||||
relocs = (arelent **) xmalloc (reloc_size);
|
||||
|
||||
reloc_count = bfd_canonicalize_reloc (abfd, sec, relocs, NULL);
|
||||
if (reloc_count == 0)
|
||||
if (reloc_count <= 0)
|
||||
free (relocs);
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue