aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r--binutils/dwarf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index e2bac1f..5f953d5 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -6796,6 +6796,14 @@ process_cu_tu_index (struct dwarf_section *section, int do_display)
SAFE_BYTE_GET (row, pi, 4, limit);
if (row != 0)
{
+ /* PR 17531: file: a05f6ab3. */
+ if (row >= nused)
+ {
+ warn (_("Row index (%u) is larger than number of used entries (%u)\n"),
+ row, nused);
+ return 0;
+ }
+
if (!do_display)
memcpy (&this_set[row - 1].signature, ph, sizeof (uint64_t));