mirror of
https://github.com/php/php-src.git
synced 2024-10-19 23:44:13 +00:00
19 lines
314 B
Plaintext
19 lines
314 B
Plaintext
|
--TEST--
|
||
|
Crash inside stream_get_line(), when length=0
|
||
|
--FILE--
|
||
|
<?php
|
||
|
$path = dirname(__FILE__) . '/test.html';
|
||
|
|
||
|
file_put_contents($path, "foo<br>bar<br>foo");
|
||
|
$fp = fopen($path, "r");
|
||
|
while ($fp && !feof($fp)) {
|
||
|
echo stream_get_line($fp, 0, "<br>")."\n";
|
||
|
}
|
||
|
fclose($fp);
|
||
|
@unlink($path);
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
foo
|
||
|
bar
|
||
|
foo
|