[binutils-gdb] ubsan: emit_inc_line_addr integer overflow
Alan Modra
amodra@sourceware.org
Fri May 16 12:20:05 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=31fd9be3344a0e2ae2851b1f144eede82da16efc
commit 31fd9be3344a0e2ae2851b1f144eede82da16efc
Author: Alan Modra <amodra@gmail.com>
Date: Fri May 16 18:34:31 2025 +0930
ubsan: emit_inc_line_addr integer overflow
Commit 07cf922195d1 fixed the one in size_inc_line_addr. Silly me
missed the identical overflow in emit_inc_line_addr
Diff:
---
gas/dwarf2dbg.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gas/dwarf2dbg.c b/gas/dwarf2dbg.c
index a53ad1a150d..fd1f96d80c5 100644
--- a/gas/dwarf2dbg.c
+++ b/gas/dwarf2dbg.c
@@ -1694,7 +1694,7 @@ emit_inc_line_addr (int line_delta, addressT addr_delta, char *p, int len)
}
/* Bias the line delta by the base. */
- tmp = line_delta - DWARF2_LINE_BASE;
+ tmp = (unsigned) line_delta - DWARF2_LINE_BASE;
/* If the line increment is out of range of a special opcode, we
must encode it with DW_LNS_advance_line. */
More information about the Binutils-cvs
mailing list