diff options
author | Tony Cook <tony@develop-help.com> | 2017-06-14 09:42:31 +1000 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2017-06-14 09:42:31 +1000 |
commit | 9604fbf0722bd97ca6031a263c50ad52b6633db7 (patch) | |
tree | c66059859dd3a7ea143d1ba2ba3e5713a3effac7 /numeric.c | |
parent | 290f44ead05a5718e4f391f298e4d75e601393e5 (diff) | |
download | perl-9604fbf0722bd97ca6031a263c50ad52b6633db7.tar.gz |
(perl #131526) don't go beyond the end of the NUL in my_atof2
Perl_my_atof2() calls GROK_NUMERIC_RADIX() to detect and skip past
a decimal point and then can increment the parse pointer (s) before
checking what it points at, so skipping the terminating NUL if the
decimal point is immediately before the NUL.
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1485,9 +1485,9 @@ Perl_my_atof2(pTHX_ const char* orig, NV* value) else if (!seen_dp && GROK_NUMERIC_RADIX(&s, send)) { seen_dp = 1; if (sig_digits > MAX_SIG_DIGITS) { - do { + while (isDIGIT(*s)) { ++s; - } while (isDIGIT(*s)); + } break; } } |