]> granicus.if.org Git - php/commitdiff
Fix #71882 amendment 2: Negative ftruncate() on php://memory exhausts memory
authorChristoph M. Becker <cmbecker69@gmx.de>
Wed, 31 Aug 2016 14:33:14 +0000 (16:33 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Wed, 31 Aug 2016 14:33:14 +0000 (16:33 +0200)
ext/standard/tests/file/bug71882.phpt

index ae0137b5999ae5198c777c6e759119fc76251a0b..3cb6d85240b76b9945e9bf4bdc5de326b48f65c8 100644 (file)
@@ -3,9 +3,9 @@ Bug #71882 (Negative ftruncate() on php://memory exhausts memory)
 --FILE--
 <?php
 $fd = fopen("php://memory", "w+");
-ftruncate($fd, -1);
+var_dump(ftruncate($fd, -1));
 ?>
 ==DONE==
 --EXPECTF--
-Warning: ftruncate(): Negative size is not supported in %s%ebug71882.php on line %d
+bool(false)
 ==DONE==