summaryrefslogtreecommitdiff
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
parent53511513524d37cf430b4cf3cc61bda44173e441 (diff)
downloadphp-git-1c7f608071110a8e90e4ae04d3b4d970a70f8c7d.tar.gz
Fixed bug #72172 (zend_hex_strtod should not use strlen)
-rw-r--r--NEWS4
-rw-r--r--Zend/zend_strtod.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 12dfcf4dd8..9679e04bdc 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,10 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2016, PHP 5.6.22
+ - Core:
+ . Fixed bug #72172 (zend_hex_strtod should not use strlen).
+ (bwitz at hotmail dot com )
+
28 Apr 2016, PHP 5.6.21
- Core:
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;
}