https://sourceware.org/bugzilla/show_bug.cgi?id=24116
Signed-off-by: Mark Wielaard <mark@klomp.org>
+2019-01-22 Mark Wielaard <mark@klomp.org>
+
+ * readelf.c (print_debug_line_section): Check we are not at end of
+ line data when reading parameters for unknown opcodes.
+
2019-01-20 Mark Wielaard <mark@klomp.org>
* readelf.c (print_debug_line_section): Check terminating NUL byte
" unknown opcode with %" PRIu8 " parameters:",
standard_opcode_lengths[opcode]),
standard_opcode_lengths[opcode]);
- for (int n = standard_opcode_lengths[opcode]; n > 0; --n)
+ for (int n = standard_opcode_lengths[opcode];
+ n > 0 && linep < lineendp; --n)
{
get_uleb128 (u128, linep, lineendp);
if (n != standard_opcode_lengths[opcode])