mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
Fix out of bounds read in sccp
This commit is contained in:
parent
50cce5eb4f
commit
ca6f41aa5a
1 changed files with 1 additions and 0 deletions
|
@ -2329,6 +2329,7 @@ static int try_remove_definition(sccp_ctx *ctx, int var_num, zend_ssa_var *var,
|
||||||
if (opline->opcode == ZEND_DO_ICALL) {
|
if (opline->opcode == ZEND_DO_ICALL) {
|
||||||
removed_ops = remove_call(ctx, opline, ssa_op);
|
removed_ops = remove_call(ctx, opline, ssa_op);
|
||||||
} else if (opline->opcode == ZEND_TYPE_CHECK
|
} else if (opline->opcode == ZEND_TYPE_CHECK
|
||||||
|
&& ssa_op->op1_use >= 0
|
||||||
&& !value_known(&ctx->values[ssa_op->op1_use])) {
|
&& !value_known(&ctx->values[ssa_op->op1_use])) {
|
||||||
/* For TYPE_CHECK we may compute the result value without knowing the
|
/* For TYPE_CHECK we may compute the result value without knowing the
|
||||||
* operand, based on type inference information. Make sure the operand is
|
* operand, based on type inference information. Make sure the operand is
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue