mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
semi-fix string offsets crash - now it doesn't crash, but still leaks
This commit is contained in:
parent
18296252b2
commit
3944ce41c3
@ -782,6 +782,15 @@ static void zend_fetch_dimension_address(znode *result, znode *op1, znode *op2,
|
||||
zval *container;
|
||||
zval ***retval = &T(result->u.var).var.ptr_ptr;
|
||||
|
||||
if (!container_ptr) {
|
||||
if(T(op1->u.var).EA.type == IS_STRING_OFFSET) {
|
||||
zend_error(E_WARNING, "Cannot use string offset as an array");
|
||||
}
|
||||
*retval = &EG(error_zval_ptr);
|
||||
SELECTIVE_PZVAL_LOCK(**retval, result);
|
||||
return;
|
||||
}
|
||||
|
||||
container = *container_ptr;
|
||||
|
||||
if (container == EG(error_zval_ptr)) {
|
||||
|
Loading…
Reference in New Issue
Block a user