com php-src: Fixed bug #72172 (zend_hex_strtod should not use strlen): NEWS Zend/zend_strtod.c

From: Date: Sat, 07 May 2016 06:52:06 +0000
Subject: com php-src: Fixed bug #72172 (zend_hex_strtod should not use strlen): NEWS Zend/zend_strtod.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92060@lists.php.net to get a copy of this message
Commit: 1c7f608071110a8e90e4ae04d3b4d970a70f8c7d Author: Xinchen Hui <laruence@gmail.com> Fri, 6 May 2016 23:52:06 -0700 Parents: 53511513524d37cf430b4cf3cc61bda44173e441 Branches: PHP-5.6 PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1c7f608071110a8e90e4ae04d3b4d970a70f8c7d Log: Fixed bug #72172 (zend_hex_strtod should not use strlen) Bugs: https://bugs.php.net/72172 Changed paths: M NEWS M Zend/zend_strtod.c Diff: diff --git a/NEWS b/NEWS index 12dfcf4..9679e04 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 4546614...e74cf0e 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; }

« previous php.cvs (#92060) next »