mirror of
https://github.com/php/php-src.git
synced 2024-11-28 20:34:29 +08:00
Fixed bug #44720 (Prevent infinite recursion within session_register)
This commit is contained in:
parent
f0563a2068
commit
944061ba37
@ -1655,12 +1655,19 @@ static void php_register_var(zval** entry TSRMLS_DC)
|
||||
zval **value;
|
||||
|
||||
if (Z_TYPE_PP(entry) == IS_ARRAY) {
|
||||
if (Z_ARRVAL_PP(entry)->nApplyCount > 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
zend_hash_internal_pointer_reset(Z_ARRVAL_PP(entry));
|
||||
Z_ARRVAL_PP(entry)->nApplyCount++;
|
||||
|
||||
while (zend_hash_get_current_data(Z_ARRVAL_PP(entry), (void**)&value) == SUCCESS) {
|
||||
php_register_var(value TSRMLS_CC);
|
||||
zend_hash_move_forward(Z_ARRVAL_PP(entry));
|
||||
}
|
||||
|
||||
Z_ARRVAL_PP(entry)->nApplyCount--;
|
||||
} else {
|
||||
convert_to_string_ex(entry);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user