diff options
author | Tony Cook <tony@develop-help.com> | 2019-11-11 14:43:42 +1100 |
---|---|---|
committer | Tony Cook <tony@develop-help.com> | 2019-11-12 07:46:10 +1100 |
commit | e56dfd967ce460481a9922d14e931b438548093d (patch) | |
tree | eb4ecc110a2133f619bc1c0b38e5c91bc0a567a4 /numeric.c | |
parent | 9e0c85b92fb133a122394815017a828f27c7e530 (diff) | |
download | perl-e56dfd967ce460481a9922d14e931b438548093d.tar.gz |
handle s being updated without len being updated
fix #17279
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1560,7 +1560,7 @@ Perl_my_atof3(pTHX_ const char* orig, NV* value, const STRLEN len) /* strtold() accepts 0x-prefixed hex and in POSIX implementations, 0b-prefixed binary numbers, which is backward incompatible */ - if ((len == 0 || len >= 2) && *s == '0' && + if ((len == 0 || len - (s-orig) >= 2) && *s == '0' && (isALPHA_FOLD_EQ(s[1], 'x') || isALPHA_FOLD_EQ(s[1], 'b'))) { *value = 0; return (char *)s+1; |