aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2022-01-01 13:53:32 +1030
committerAlan Modra <amodra@gmail.com>2022-01-01 14:22:13 +1030
commitb685de86cc42cec995c38c042a4377be471fc77b (patch)
treeeca070f690b0cb54af590a9829624684f13e0f7c /gas
parentfcec5debef3f23dd0024a4501609353676d7dc50 (diff)
downloadgdb-b685de86cc42cec995c38c042a4377be471fc77b.zip
gdb-b685de86cc42cec995c38c042a4377be471fc77b.tar.gz
gdb-b685de86cc42cec995c38c042a4377be471fc77b.tar.bz2
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.
Diffstat (limited to 'gas')
-rw-r--r--gas/read.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gas/read.c b/gas/read.c
index cd82c83..6c8b7c3 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++;