diff options
author | Xinchen Hui <laruence@gmail.com> | 2016-05-06 23:52:06 -0700 |
---|---|---|
committer | Xinchen Hui <laruence@gmail.com> | 2016-05-06 23:52:06 -0700 |
commit | 1c7f608071110a8e90e4ae04d3b4d970a70f8c7d (patch) | |
tree | 1be2aa0ed010461bb6875e3203d53587cc7695c0 /Zend | |
parent | 53511513524d37cf430b4cf3cc61bda44173e441 (diff) | |
download | php-git-1c7f608071110a8e90e4ae04d3b4d970a70f8c7d.tar.gz |
Fixed bug #72172 (zend_hex_strtod should not use strlen)
Diffstat (limited to 'Zend')
-rw-r--r-- | Zend/zend_strtod.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c index 4546614cfd..e74cf0eb82 100644 --- a/Zend/zend_strtod.c +++ b/Zend/zend_strtod.c @@ -2590,7 +2590,7 @@ ZEND_API double zend_hex_strtod(const char *str, const char **endptr) int any = 0; double value = 0; - if (strlen(str) < 2) { + if (s[0] == '\0' || s[1] == '\0') { *endptr = str; return 0.0; } |