Skip to content

Commit 7099342

Browse files
committed
Fix OSS-Fuzz #439125710: Pipe cannot be used in write context
1 parent 096938f commit 7099342

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
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)