]> granicus.if.org Git - php/commitdiff
use portable strtol
authorAnatol Belski <ab@php.net>
Tue, 10 Feb 2015 12:06:24 +0000 (13:06 +0100)
committerAnatol Belski <ab@php.net>
Tue, 10 Feb 2015 12:06:57 +0000 (13:06 +0100)
ext/json/json_scanner.c
ext/json/json_scanner.re

index 2cfd8b84bea0b4de42c0c312a1560c045fba1d88..d4e6cf293cd98ee9079deb85f6761fe3bbb6df47 100644 (file)
@@ -267,7 +267,7 @@ yy16:
                        }
                }
                if (!bigint) {
-                       ZVAL_LONG(&s->value, strtol((char *) s->token, NULL, 10));
+                       ZVAL_LONG(&s->value, ZEND_STRTOL((char *) s->token, NULL, 10));
                        return PHP_JSON_T_INT;
                } else if (s->options & PHP_JSON_BIGINT_AS_STRING) {
                        ZVAL_STRINGL(&s->value, (char *) s->token, s->cursor - s->token);
index 28743e5453cc07bf53930d524bab3e838d0c2926..cbbfa41e5a2ae53c74a3f759a7ab692efb0b91ef 100644 (file)
@@ -171,7 +171,7 @@ std:
                        }
                }
                if (!bigint) {
-                       ZVAL_LONG(&s->value, strtol((char *) s->token, NULL, 10));
+                       ZVAL_LONG(&s->value, ZEND_STRTOL((char *) s->token, NULL, 10));
                        return PHP_JSON_T_INT;
                } else if (s->options & PHP_JSON_BIGINT_AS_STRING) {
                        ZVAL_STRINGL(&s->value, (char *) s->token, s->cursor - s->token);