This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PR22204, Lack of DW_LNE_end_sequence causes "infinite" loop
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 26 Sep 2017 09:42:51 +0930
- Subject: PR22204, Lack of DW_LNE_end_sequence causes "infinite" loop
- Authentication-results: sourceware.org; auth=none
PR 22204
* dwarf2.c (decode_line_info): Ensure line_ptr stays within
bounds in inner loop.
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 9ae5fba..2c45790 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -2277,7 +2277,7 @@ decode_line_info (struct comp_unit *unit, struct dwarf2_debug *stash)
bfd_vma high_pc = 0;
/* Decode the table. */
- while (! end_sequence)
+ while (!end_sequence && line_ptr < line_end)
{
op_code = read_1_byte (abfd, line_ptr, line_end);
line_ptr += 1;
--
Alan Modra
Australia Development Lab, IBM