php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #72172
Patch zend_strtod.patch revision 2016-05-06 19:02 UTC by bwitz at hotmail dot com

Patch zend_strtod.patch for *Compile Issues Bug #72172

Patch version 2016-05-06 19:02 UTC

Return to Bug #72172 | Download this patch
Patch Revisions:

Developer: bwitz@hotmail.com

diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c
index 22d509e4a79c..d1b4014fbeec 100644
--- a/Zend/zend_strtod.c
+++ b/Zend/zend_strtod.c
@@ -4416,7 +4416,7 @@ ZEND_API double zend_hex_strtod(const char *str, const char **endptr)
        int any = 0;
        double value = 0;
 
-       if (strlen(str) < 2) {
+       if (str[0] == '\0' || str[1] == '\0') {
                if (endptr != NULL) {
                        *endptr = str;
                }
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC