summaryrefslogtreecommitdiff
path: root/ext/standard/tests/general_functions/bug72306.phpt
blob: 05c25e6f1e9f092e3efededa08ad4017b2abd245 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--TEST--
Bug #72306 (Heap overflow through proc_open and $env parameter)
--FILE--
<?php
class moo {
	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