display_debug_rnglists_list

* dwarf.c (display_debug_rnglists_list): Avoid pointer UB.
This commit is contained in:
Alan Modra 2021-05-15 15:17:16 +09:30
parent 5250d2f0a5
commit 669f463dbc
2 changed files with 5 additions and 1 deletions

View file

@ -7603,7 +7603,7 @@ display_debug_rnglists_list (unsigned char *start, unsigned char *finish,
/* Initialize it due to a false compiler warning. */
dwarf_vma begin = -1, length, end = -1;
if (start + 1 > finish)
if (start >= finish)
{
warn (_("Range list starting at offset 0x%lx is not terminated.\n"),
offset);