diff options
author | Zefram <zefram@fysh.org> | 2017-12-06 01:40:43 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2017-12-06 01:40:43 +0000 |
commit | 7c6e7cf06853eef1d1b271077c402c5f8655fbe6 (patch) | |
tree | dba122c2b78c8294bba96179d51e2ebcdbb3ddb5 /toke.c | |
parent | c86de4c07d8483411299c7c5d7d78f4fdaa4b225 (diff) | |
download | perl-7c6e7cf06853eef1d1b271077c402c5f8655fbe6.tar.gz |
avoid negative shift in scan_num()
Lengthy binaryish floating point literals used to perform illegal bit
shifts. Ignore digits that are past the end of the significand at an
earlier stage to avoid this. Code fix by Tony C. Fixes [perl #131894].
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -11091,7 +11091,7 @@ Perl_scan_num(pTHX_ const char *start, YYSTYPE* lvalp) hexfp_uquad <<= shift; hexfp_uquad |= b; hexfp_frac_bits += shift; - } else { + } else if (significant_bits - shift < NV_MANT_DIG) { /* We are at a hexdigit either at, * or straddling, the edge of mantissa. * We will try grabbing as many as |