mirror of
https://github.com/php/php-src.git
synced 2026-04-29 19:23:22 +02:00
902d64390e
Writing to a proprety that hasn't been declared is deprecated, unless the class uses the #[AllowDynamicProperties] attribute or defines __get()/__set(). RFC: https://wiki.php.net/rfc/deprecate_dynamic_properties
25 lines
505 B
PHP
25 lines
505 B
PHP
--TEST--
|
|
Bug #72306 (Heap overflow through proc_open and $env parameter)
|
|
--FILE--
|
|
<?php
|
|
class moo {
|
|
public $a;
|
|
function __construct() { $this->a = 0; }
|
|
function __toString() { return $this->a++ ? str_repeat("a", 0x8000) : "a"; }
|
|
}
|
|
|
|
$env = array('some_option' => new moo());
|
|
$pipes = array();
|
|
$description = array(
|
|
0 => array("pipe", "r"),
|
|
1 => array("pipe", "w"),
|
|
2 => array("pipe", "r")
|
|
);
|
|
|
|
$process = proc_open('nothing', $description, $pipes, NULL, $env);
|
|
|
|
?>
|
|
okey
|
|
--EXPECT--
|
|
okey
|