On Sun, Jun 28, 2026 at 08:29:42PM +0200, Fabrice Derepas wrote:
> Component: libiberty / cp-demangle.c

libiberty is owned by the gcc project.

> Option B: perform the addition safely in `d_compact_number`:
> ```c
> /* d_compact_number(), line 3269 */
> -    num = d_number (di) + 1;
> +    num = d_number (di);
> +    if (num == INT_MAX)
> +      return -1;
> +    num = num + 1;

Or just write
   num = d_number (di) + 1u;
Wrap-around will be caught by the < 0 test following this code.

-- 
Alan Modra

Reply via email to