display_debug_rnglists_list
* dwarf.c (display_debug_rnglists_list): Avoid pointer UB.
This commit is contained in:
parent
5250d2f0a5
commit
669f463dbc
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2021-05-15 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* dwarf.c (display_debug_rnglists_list): Avoid pointer UB.
|
||||
|
||||
2021-05-15 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* dwarf.c (display_debug_str_offsets): Constrain reads to length
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue