PR 22059
* dwarf2.c (decode_line_info): Fix test for an overlong line info
structure.
+2017-09-01 Nick Clifton <nickc@redhat.com>
+
+ PR 22059
+ * dwarf2.c (decode_line_info): Fix test for an overlong line info
+ structure.
+
2017-09-01 Nick Clifton <nickc@redhat.com>
PR 22058
offset_size = 8;
}
- if (lh.total_length > stash->dwarf_line_size)
+ if (unit->line_offset + lh.total_length > stash->dwarf_line_size)
{
_bfd_error_handler
/* xgettext: c-format */
- (_("Dwarf Error: Line info data is bigger (%#Lx) than the section (%#Lx)"),
- lh.total_length, stash->dwarf_line_size);
+ (_("Dwarf Error: Line info data is bigger (%#Lx) than the space remaining in the section (%#Lx)"),
+ lh.total_length, stash->dwarf_line_size - unit->line_offset);
bfd_set_error (bfd_error_bad_value);
return NULL;
}