summaryrefslogtreecommitdiff
path: root/Zend/zend_strtod.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_strtod.c')
-rw-r--r--Zend/zend_strtod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c
index 8a0863261b..889a31685c 100644
--- a/Zend/zend_strtod.c
+++ b/Zend/zend_strtod.c
@@ -4456,7 +4456,7 @@ ZEND_API double zend_oct_strtod(const char *str, const char **endptr)
double value = 0;
int any = 0;
- if (strlen(str) < 1) {
+ if (str[0] == '\0') {
if (endptr != NULL) {
*endptr = str;
}
@@ -4491,7 +4491,7 @@ ZEND_API double zend_bin_strtod(const char *str, const char **endptr)
double value = 0;
int any = 0;
- if (strlen(str) < 2) {
+ if (str[0] == '\0' || str[1] == '\0') {
if (endptr != NULL) {
*endptr = str;
}