Skip to content

Commit c091db1

Browse files
committed
Merge branch 'PHP-8.4' into PHP-8.5
* PHP-8.4: Fix OSS-Fuzz #546798343: Heap-buffer-overflow in zend_delete_call_instructions with callable conversion
2 parents 6baec62 + 3213c3f commit c091db1

3 files changed

Lines changed: 24 additions & 0 deletions

File tree

‎NEWS‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ PHP NEWS
3838
. Fixed bug GH-23106 (mb_strpos() reads past the end of a haystack ending in
3939
a truncated UTF-8 sequence). (Lazizbek Ergashev)
4040

41+
- Opcache:
42+
. Fixed OSS-Fuzz #546798343 (Heap-buffer-overflow in optimizer with
43+
FCCs and inlining). (ndossche)
44+
4145
- PDO:
4246
. Fixed PDOStatement::getColumnMeta() reading out of bounds for an invalid
4347
column index. (Ilia Alshanetsky)

‎Zend/Optimizer/optimize_func_calls.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ static void zend_delete_call_instructions(zend_op_array *op_array, zend_op *opli
6363
case ZEND_DO_ICALL:
6464
case ZEND_DO_UCALL:
6565
case ZEND_DO_FCALL_BY_NAME:
66+
case ZEND_CALLABLE_CONVERT:
6667
call++;
6768
break;
6869
case ZEND_SEND_VAL:
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
--TEST--
2+
OSS-Fuzz #546798343 (Heap-buffer-overflow in zend_delete_call_instructions with callable conversion)
3+
--EXTENSIONS--
4+
opcache
5+
--INI--
6+
opcache.enable=1
7+
opcache.enable_cli=1
8+
--FILE--
9+
<?php
10+
11+
$x = function() {};
12+
gonnaBeInlined($x(...));
13+
function gonnaBeInlined($foo) {
14+
}
15+
16+
echo "Done";
17+
?>
18+
--EXPECT--
19+
Done

0 commit comments

Comments
 (0)