From: Alan Modra Date: Fri, 16 May 2025 09:04:31 +0000 (+0930) Subject: ubsan: emit_inc_line_addr integer overflow X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=31fd9be3344a0e2ae2851b1f144eede82da16efc;p=thirdparty%2Fbinutils-gdb.git 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 --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. */