Skip to content

Commit 818b850

Browse files
khwilliamsonsteve-m-hay
authored andcommitted
Actually fix GH #17370
I only added a test, but not the change in 9f16475. The test passes except when run under address sanitizer or valgrind. (cherry picked from commit dca9f61)
1 parent 55288d9 commit 818b850

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

numeric.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,9 @@ Perl_grok_infnan(pTHX_ const char** sp, const char* send)
765765
s++;
766766

767767
flags |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT;
768+
if (s == send) {
769+
return flags;
770+
}
768771

769772
/* NaN can be followed by various stuff (NaNQ, NaNS), but
770773
* there are also multiple different NaN values, and some

0 commit comments

Comments
 (0)