summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-12-17 14:59:29 -0700
committerKarl Williamson <khw@cpan.org>2019-12-17 15:03:21 -0700
commitdca9f615c2ca4c784ef9cdd9a7a313de40998bcf (patch)
tree1dc1050762c51f6070ea6cea6cebbe065d9ea2eb /numeric.c
parentda255c79e19b6d6937fe9fe83c3bc7cd7ae8db5f (diff)
downloadperl-dca9f615c2ca4c784ef9cdd9a7a313de40998bcf.tar.gz
Actually fix GH #17370
I only added a test, but not the change in 9f16475a53933d1d9c547f871b97b3b12160cece. The test passes except when run under address sanitizer or valgrind.
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 142f61753a..0b8677d064 100644
--- a/numeric.c
+++ b/numeric.c
@@ -780,6 +780,9 @@ Perl_grok_infnan(pTHX_ const char** sp, const char* send)
s++;
flags |= IS_NUMBER_NAN | IS_NUMBER_NOT_INT;
+ if (s == send) {
+ return flags;
+ }
/* NaN can be followed by various stuff (NaNQ, NaNS), but
* there are also multiple different NaN values, and some