Skip to content

Commit fb07b3b

Browse files
author
cpriest
committed
Fixed segfault when a sub-class tried to redefine a property accessor as
a standard property with no accessors. In this case the sub-class inherits the accessors even though they are not defined by the sub-class.
1 parent 7fee8dd commit fb07b3b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Zend/zend_compile.c

+5
Original file line numberDiff line numberDiff line change
@@ -3797,6 +3797,11 @@ static zend_bool do_inherit_property_access_check(HashTable *target_ht, zend_pro
37973797
ce->default_properties_table[parent_info->offset] = ce->default_properties_table[child_info->offset];
37983798
ce->default_properties_table[child_info->offset] = NULL;
37993799
child_info->offset = parent_info->offset;
3800+
3801+
if(parent_info->ai && !child_info->ai) {
3802+
child_info->ai = ecalloc(1, sizeof(zend_accessor_info));
3803+
child_info->ai->flags = parent_info->ai->flags;
3804+
}
38003805
}
38013806
return 0; /* Don't copy from parent */
38023807
} else {

0 commit comments

Comments
 (0)