Skip to content

Commit 2224f63

Browse files
committed
Prevent usage of uninitialized class entry
1 parent c099713 commit 2224f63

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ext/opcache/Optimizer/zend_inference.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2180,12 +2180,13 @@ static uint32_t zend_convert_type_declaration_mask(uint32_t type_mask) {
21802180
uint32_t zend_fetch_arg_info_type(const zend_script *script, zend_arg_info *arg_info, zend_class_entry **pce)
21812181
{
21822182
uint32_t tmp;
2183+
2184+
*pce = NULL;
21832185
if (!ZEND_TYPE_IS_SET(arg_info->type)) {
21842186
return MAY_BE_ANY|MAY_BE_ARRAY_KEY_ANY|MAY_BE_ARRAY_OF_ANY|MAY_BE_ARRAY_OF_REF|MAY_BE_RC1|MAY_BE_RCN;
21852187
}
21862188

21872189
tmp = zend_convert_type_declaration_mask(ZEND_TYPE_PURE_MASK(arg_info->type));
2188-
*pce = NULL;
21892190
if (ZEND_TYPE_HAS_CLASS(arg_info->type)) {
21902191
tmp |= MAY_BE_OBJECT;
21912192
/* As we only have space to store one CE, we use a plain object type for class unions. */

0 commit comments

Comments
 (0)