Skip to content

Commit b80d30d

Browse files
committed
Fix type inference for assign to string offset with invalid index.
Fixes oss-fuzz #43277
1 parent 4170d41 commit b80d30d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/opcache/Optimizer/zend_inference.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2623,7 +2623,7 @@ static zend_always_inline int _zend_update_type_info(
26232623
if (ssa_op->result_def >= 0) {
26242624
tmp = 0;
26252625
if (t1 & MAY_BE_STRING) {
2626-
tmp |= MAY_BE_STRING;
2626+
tmp |= MAY_BE_STRING | MAY_BE_NULL;
26272627
}
26282628
if (t1 & (MAY_BE_ARRAY|MAY_BE_FALSE|MAY_BE_NULL|MAY_BE_UNDEF)) {
26292629
tmp |= (OP1_DATA_INFO() & (MAY_BE_ANY | MAY_BE_ARRAY_KEY_ANY | MAY_BE_ARRAY_OF_ANY | MAY_BE_ARRAY_OF_REF));

0 commit comments

Comments
 (0)