mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
fix #41813 (segmentation fault when using string offset as an object)
patch by judas dot iscariote at gmail dot com
This commit is contained in:
parent
abffe87d42
commit
8e26df9523
@ -530,6 +530,10 @@ static inline void zend_assign_to_object(znode *result, zval **object_ptr, znode
|
||||
zval *value = get_zval_ptr(value_op, Ts, &free_value, BP_VAR_R);
|
||||
zval **retval = &T(result->u.var).var.ptr;
|
||||
|
||||
if (!object_ptr) {
|
||||
zend_error_noreturn(E_ERROR, "Cannot use string offset as an array");
|
||||
}
|
||||
|
||||
if (*object_ptr == EG(error_zval_ptr)) {
|
||||
FREE_OP(free_op2);
|
||||
if (!RETURN_VALUE_UNUSED(result)) {
|
||||
|
Loading…
Reference in New Issue
Block a user