mirror of
https://github.com/php/php-src.git
synced 2026-04-20 22:41:20 +02:00
MFH: make use of zend_atol()
This commit is contained in:
@@ -6128,7 +6128,7 @@ static void php_simple_ini_parser_cb(zval *arg1, zval *arg2, zval *arg3, int cal
|
||||
}
|
||||
|
||||
if (!(Z_STRLEN_P(arg1) > 1 && Z_STRVAL_P(arg1)[0] == '0') && is_numeric_string(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1), NULL, NULL, 0) == IS_LONG) {
|
||||
ulong key = (ulong) zend_atoi(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1));
|
||||
ulong key = (ulong) zend_atol(Z_STRVAL_P(arg1), Z_STRLEN_P(arg1));
|
||||
if (zend_hash_index_find(Z_ARRVAL_P(arr), key, (void **) &find_hash) == FAILURE) {
|
||||
ALLOC_ZVAL(hash);
|
||||
INIT_PZVAL(hash);
|
||||
|
||||
@@ -118,7 +118,7 @@ static PHP_INI_MH(OnSetPrecision)
|
||||
static PHP_INI_MH(OnChangeMemoryLimit)
|
||||
{
|
||||
if (new_value) {
|
||||
PG(memory_limit) = zend_atoi(new_value, new_value_length);
|
||||
PG(memory_limit) = zend_atol(new_value, new_value_length);
|
||||
} else {
|
||||
PG(memory_limit) = 1<<30; /* effectively, no limit */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user