Skip to content

Commit c98b173

Browse files
committed
Fix OSS-Fuzz #439125710: Pipe cannot be used in write context
Closes GH-19505.
1 parent d92675b commit c98b173

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ PHP NEWS
1010
. The report_memleaks INI directive has been deprecated. (alexandre-daubois)
1111
. Constant redeclaration is deprecated and this behavior will trigger an
1212
error in PHP 9. (alexandre-daubois)
13+
. Fixed OSS-Fuzz #439125710 (Pipe cannot be used in write context).
14+
(nielsdos)
1315

1416
- ODBC:
1517
. Remove ODBCVER and assume ODBC 3.5. (Calvin Buckley)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
--TEST--
2+
OSS-Fuzz #439125710 (Pipe cannot be used in write context)
3+
--FILE--
4+
<?php
5+
list(y|>y)=y;
6+
?>
7+
--EXPECTF--
8+
Fatal error: Can't use function return value in write context in %s on line %d

Zend/zend_compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3365,7 +3365,7 @@ static void zend_compile_list_assign(
33653365

33663366
static void zend_ensure_writable_variable(const zend_ast *ast) /* {{{ */
33673367
{
3368-
if (ast->kind == ZEND_AST_CALL) {
3368+
if (ast->kind == ZEND_AST_CALL || ast->kind == ZEND_AST_PIPE) {
33693369
zend_error_noreturn(E_COMPILE_ERROR, "Can't use function return value in write context");
33703370
}
33713371
if (

0 commit comments

Comments
 (0)