Skip to content

Commit

Permalink
Fix type inference for assign to string offset with invalid index.
Browse files Browse the repository at this point in the history
Fixes oss-fuzz #43277
  • Loading branch information
dstogov committed Jan 10, 2022
1 parent 4170d41 commit b80d30d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/opcache/Optimizer/zend_inference.c
Original file line number Diff line number Diff line change
Expand Up @@ -2623,7 +2623,7 @@ static zend_always_inline int _zend_update_type_info(
if (ssa_op->result_def >= 0) {
tmp = 0;
if (t1 & MAY_BE_STRING) {
tmp |= MAY_BE_STRING;
tmp |= MAY_BE_STRING | MAY_BE_NULL;
}
if (t1 & (MAY_BE_ARRAY|MAY_BE_FALSE|MAY_BE_NULL|MAY_BE_UNDEF)) {
tmp |= (OP1_DATA_INFO() & (MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF));
Expand Down

0 comments on commit b80d30d

Please sign in to comment.