Skip to content

Commit 4a875e1

Browse files
committed
use portable strtol
1 parent 4241a09 commit 4a875e1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/json/json_scanner.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ int php_json_scan(php_json_scanner *s)
267267
}
268268
}
269269
if (!bigint) {
270-
ZVAL_LONG(&s->value, strtol((char *) s->token, NULL, 10));
270+
ZVAL_LONG(&s->value, ZEND_STRTOL((char *) s->token, NULL, 10));
271271
return PHP_JSON_T_INT;
272272
} else if (s->options & PHP_JSON_BIGINT_AS_STRING) {
273273
ZVAL_STRINGL(&s->value, (char *) s->token, s->cursor - s->token);

ext/json/json_scanner.re

+1-1
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ std:
171171
}
172172
}
173173
if (!bigint) {
174-
ZVAL_LONG(&s->value, strtol((char *) s->token, NULL, 10));
174+
ZVAL_LONG(&s->value, ZEND_STRTOL((char *) s->token, NULL, 10));
175175
return PHP_JSON_T_INT;
176176
} else if (s->options & PHP_JSON_BIGINT_AS_STRING) {
177177
ZVAL_STRINGL(&s->value, (char *) s->token, s->cursor - s->token);

0 commit comments

Comments
 (0)