summaryrefslogtreecommitdiff
path: root/Zend/zend_strtod.c
diff options
context:
space:
mode:
authorXinchen Hui <laruence@gmail.com>2016-05-06 23:52:06 -0700
committerXinchen Hui <laruence@gmail.com>2016-05-06 23:52:06 -0700
commit1c7f608071110a8e90e4ae04d3b4d970a70f8c7d (patch)
tree1be2aa0ed010461bb6875e3203d53587cc7695c0 /Zend/zend_strtod.c
parent53511513524d37cf430b4cf3cc61bda44173e441 (diff)
downloadphp-git-1c7f608071110a8e90e4ae04d3b4d970a70f8c7d.tar.gz
Fixed bug #72172 (zend_hex_strtod should not use strlen)
Diffstat (limited to 'Zend/zend_strtod.c')
-rw-r--r--Zend/zend_strtod.c2
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;
}