Skip to content

Commit c3727cc

Browse files
committed
- Added test relative to the fix in rev #305346.
1 parent dc8bc65 commit c3727cc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
--TEST--
2+
Unexposed/leaked stream encloses another stream
3+
--SKIPIF--
4+
<?php
5+
if (!function_exists('leak_variable')) die("skip only debug builds");
6+
--FILE--
7+
<?php
8+
$s = fopen('php://temp/maxmemory=1024','wb+');
9+
10+
$t = fopen('php://temp/maxmemory=1024','wb+');
11+
12+
/* force conversion of inner stream to STDIO. */
13+
$i = 0;
14+
while ($i++ < 5000) {
15+
fwrite($t, str_repeat('a',1024));
16+
}
17+
18+
leak_variable($s, true);
19+
leak_variable($t, true);
20+
--EXPECT--

0 commit comments

Comments
 (0)