mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2026-08-27 00:26:02 -04:00
libiberty d_compact_number signed integer overflow
https://lists.gnu.org/archive/html/bug-binutils/2026-06/msg00189.html Fix this by doing the addition in unsigned arithmetic.
This commit is contained in:
parent
5e33526e74
commit
54e80f9747
1 changed files with 1 additions and 1 deletions
|
|
@ -3266,7 +3266,7 @@ d_compact_number (struct d_info *di)
|
|||
else if (d_peek_char (di) == 'n')
|
||||
return -1;
|
||||
else
|
||||
num = d_number (di) + 1;
|
||||
num = d_number (di) + 1u;
|
||||
|
||||
if (num < 0 || ! d_check_char (di, '_'))
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue