summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-12-17 14:59:29 -0700
committerSteve Hay <steve.m.hay@googlemail.com>2020-02-12 17:57:05 +0000
commit818b850a7d83272f593d35f86a9263ec4e83dcb1 (patch)
tree8850b1e4a85b76ca4abd64821fb561f34891fb53
parent55288d9e44495dc34ab940bdafd10ff0373b359d (diff)
downloadperl-818b850a7d83272f593d35f86a9263ec4e83dcb1.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. (cherry picked from commit dca9f615c2ca4c784ef9cdd9a7a313de40998bcf)
-rw-r--r--numeric.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index ee77b257fe..e8e8cadf17 100644
--- a/numeric.c
+++ b/numeric.c
@@ -765,6 +765,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