summaryrefslogtreecommitdiff
path: root/ext/bcmath/libbcmath/src
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2019-12-16 00:38:54 -0800
committerStanislav Malyshev <stas@php.net>2019-12-16 00:38:54 -0800
commita65b8abf2c9702503591d894ddac0b2f046950b6 (patch)
treed5032e847df212853f6c17c7d864b816d5638b87 /ext/bcmath/libbcmath/src
parent518a160b65fe1c535dc7e78972ba7428c2a4e197 (diff)
parentd348cfb96f2543565691010ade5e0346338be5a7 (diff)
downloadphp-git-a65b8abf2c9702503591d894ddac0b2f046950b6.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2: Fixed bug #78910 Fix #78878: Buffer underflow in bc_shift_addsub Fix test Fix #78862: link() silently truncates after a null byte on Windows Fix #78863: DirectoryIterator class silently truncates after a null byte
Diffstat (limited to 'ext/bcmath/libbcmath/src')
-rw-r--r--ext/bcmath/libbcmath/src/str2num.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bcmath/libbcmath/src/str2num.c b/ext/bcmath/libbcmath/src/str2num.c
index f38d341570..03aec15930 100644
--- a/ext/bcmath/libbcmath/src/str2num.c
+++ b/ext/bcmath/libbcmath/src/str2num.c
@@ -57,9 +57,9 @@ bc_str2num (bc_num *num, char *str, int scale)
zero_int = FALSE;
if ( (*ptr == '+') || (*ptr == '-')) ptr++; /* Sign */
while (*ptr == '0') ptr++; /* Skip leading zeros. */
- while (isdigit((int)*ptr)) ptr++, digits++; /* digits */
+ while (*ptr >= '0' && *ptr <= '9') ptr++, digits++; /* digits */
if (*ptr == '.') ptr++; /* decimal point */
- while (isdigit((int)*ptr)) ptr++, strscale++; /* digits */
+ while (*ptr >= '0' && *ptr <= '9') ptr++, strscale++; /* digits */
if ((*ptr != '\0') || (digits+strscale == 0))
{
*num = bc_copy_num (BCG(_zero_));