projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b8d97d3
)
segfault in objdump.c reloc_at
author
Alan Modra
<amodra@gmail.com>
Wed, 26 Oct 2022 06:04:19 +0000
(16:34 +1030)
committer
Alan Modra
<amodra@gmail.com>
Wed, 26 Oct 2022 06:57:45 +0000
(17:27 +1030)
bfd_canonicalize_reloc returns -1L on errors.
* objdump.c (load_specific_debug_section): Properly handle
error return from bfd_canonicalize_reloc.
binutils/objdump.c
patch
|
blob
|
history
diff --git
a/binutils/objdump.c
b/binutils/objdump.c
index a4ab0dbd66c53fd2905def73b3b9be8998dcb44c..0825e051ef62bc8b46d5293d1011ac086fad79bd 100644
(file)
--- a/
binutils/objdump.c
+++ b/
binutils/objdump.c
@@
-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
{