From 69bfd1759db41c8d369f9dcc98a135c5a5d97299 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 18 Nov 2022 11:29:13 +1030 Subject: [PATCH] PR29799 heap buffer overflow in display_gdb_index dwarf.c:10548 PR 29799 * dwarf.c (display_gdb_index): Typo fix. --- binutils/dwarf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binutils/dwarf.c b/binutils/dwarf.c index d379af07..4f5f27e2 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -10615,7 +10615,7 @@ display_gdb_index (struct dwarf_section *section, { uint64_t low = byte_get_little_endian (address_table + i * 20, 8); uint64_t high = byte_get_little_endian (address_table + i * 20 + 8, 8); - uint32_t cu_index = byte_get_little_endian (address_table + i + 20 + 16, 4); + uint32_t cu_index = byte_get_little_endian (address_table + i * 20 + 16, 4); print_dwarf_vma (low, 8); print_dwarf_vma (high, 8); -- 2.25.1