From b685de86cc42cec995c38c042a4377be471fc77b Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 1 Jan 2022 13:53:32 +1030 Subject: [PATCH] ubsan: next_char_of_string signed integer overflow Squash another totally useless fuzz report that I should have ignored. * read.c (next_char_of_string): Avoid integer overflow. --- gas/read.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gas/read.c b/gas/read.c index cd82c83adeb..6c8b7c3efdb 100644 --- a/gas/read.c +++ b/gas/read.c @@ -5642,7 +5642,7 @@ next_char_of_string (void) case '8': case '9': { - long number; + unsigned number; int i; for (i = 0, number = 0; @@ -5660,7 +5660,7 @@ next_char_of_string (void) case 'x': case 'X': { - long number; + unsigned number; number = 0; c = *input_line_pointer++; -- 2.30.2