aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2019-08-17 18:01:05 +0930
committerAlan Modra <amodra@gmail.com>2019-08-17 18:06:31 +0930
commitd367307b93e5589245d1f2c8bbcfe709404540a8 (patch)
tree92525c95c38ee37cc57e8009d5d0bedf59f1ff00 /binutils/dwarf.c
parent98ac8787e9bea0fef101b9b63c5dd06e653a46b3 (diff)
downloadgdb-d367307b93e5589245d1f2c8bbcfe709404540a8.zip
gdb-d367307b93e5589245d1f2c8bbcfe709404540a8.tar.gz
gdb-d367307b93e5589245d1f2c8bbcfe709404540a8.tar.bz2
PR24911, Heap overflow issue in qsort_r, dwarf.c
The actual args to this function are "pointers to pointers to debug_info". PR 24911 * dwarf.c (comp_addr_base): Dereference args.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r--binutils/dwarf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index d633832..b4738eb 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -6545,8 +6545,8 @@ display_debug_aranges (struct dwarf_section *section,
static int
comp_addr_base (const void * v0, const void * v1)
{
- debug_info * info0 = (debug_info *) v0;
- debug_info * info1 = (debug_info *) v1;
+ debug_info *info0 = *(debug_info **) v0;
+ debug_info *info1 = *(debug_info **) v1;
return info0->addr_base - info1->addr_base;
}