diff options
author | Stanislav Malyshev <stas@php.net> | 2019-12-16 00:39:37 -0800 |
---|---|---|
committer | Stanislav Malyshev <stas@php.net> | 2019-12-16 00:39:37 -0800 |
commit | d9f57e8316808341a849b38b2034348bea332982 (patch) | |
tree | 99ce2050509160a23c51afce968f318447639653 /ext/bcmath/libbcmath/src | |
parent | 7e9e0937f3a4557bf03ee5a3e7a546b266781eb4 (diff) | |
parent | a65b8abf2c9702503591d894ddac0b2f046950b6 (diff) | |
download | php-git-d9f57e8316808341a849b38b2034348bea332982.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
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
Fix #78943: mail() may release string with refcount==1 twice
Diffstat (limited to 'ext/bcmath/libbcmath/src')
-rw-r--r-- | ext/bcmath/libbcmath/src/str2num.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bcmath/libbcmath/src/str2num.c b/ext/bcmath/libbcmath/src/str2num.c index f2d6a73501..22cebaf57d 100644 --- a/ext/bcmath/libbcmath/src/str2num.c +++ b/ext/bcmath/libbcmath/src/str2num.c @@ -56,9 +56,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_)); |