aboutsummaryrefslogtreecommitdiff
path: root/binutils/dwarf.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-05-15 15:17:16 +0930
committerAlan Modra <amodra@gmail.com>2021-05-15 15:17:46 +0930
commit669f463dbc700ab2694c960bb3e3f1083323f500 (patch)
tree4b8af2c14d6817944ec46ff35b358b500757a97a /binutils/dwarf.c
parent5250d2f0a536276cbc8735e53ae70425780b991f (diff)
downloadgdb-669f463dbc700ab2694c960bb3e3f1083323f500.zip
gdb-669f463dbc700ab2694c960bb3e3f1083323f500.tar.gz
gdb-669f463dbc700ab2694c960bb3e3f1083323f500.tar.bz2
display_debug_rnglists_list
* dwarf.c (display_debug_rnglists_list): Avoid pointer UB.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r--binutils/dwarf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index a0b84fc..c4b6edf 100644
--- a/binutils/dwarf.c
+++ b/binutils/dwarf.c
@@ -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);