1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix OSS-Fuzz #439125710: Pipe cannot be used in write context

Closes GH-19505.
This commit is contained in:
Niels Dossche
2025-08-17 01:29:44 +02:00
parent d92675b6c1
commit c98b173430
3 changed files with 11 additions and 1 deletions

2
NEWS
View File

@@ -10,6 +10,8 @@ PHP NEWS
. The report_memleaks INI directive has been deprecated. (alexandre-daubois)
. Constant redeclaration is deprecated and this behavior will trigger an
error in PHP 9. (alexandre-daubois)
. Fixed OSS-Fuzz #439125710 (Pipe cannot be used in write context).
(nielsdos)
- ODBC:
. Remove ODBCVER and assume ODBC 3.5. (Calvin Buckley)

View File

@@ -0,0 +1,8 @@
--TEST--
OSS-Fuzz #439125710 (Pipe cannot be used in write context)
--FILE--
<?php
list(y|>y)=y;
?>
--EXPECTF--
Fatal error: Can't use function return value in write context in %s on line %d

View File

@@ -3365,7 +3365,7 @@ static void zend_compile_list_assign(
static void zend_ensure_writable_variable(const zend_ast *ast) /* {{{ */
{
if (ast->kind == ZEND_AST_CALL) {
if (ast->kind == ZEND_AST_CALL || ast->kind == ZEND_AST_PIPE) {
zend_error_noreturn(E_COMPILE_ERROR, "Can't use function return value in write context");
}
if (