diff options
Diffstat (limited to 'src/readelf.c')
-rw-r--r-- | src/readelf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/readelf.c b/src/readelf.c index 6bad3bfe..e3e699c4 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -8845,7 +8845,8 @@ print_debug_line_section (Dwfl_Module *dwflmod, Ebl *ebl, GElf_Ehdr *ehdr, " 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]) |