com php-src: Fix #71882 amendment 2: Negative ftruncate() on php://memory exhausts memory: ext/standard/tests/file/bug71882.phpt
| From: | Christoph Michael Becker | Date: | Wed, 31 Aug 2016 14:33:14 +0000 |
| Subject: | com php-src: Fix #71882 amendment 2: Negative ftruncate() on php://memory exhausts memory: ext/standard/tests/file/bug71882.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94203@lists.php.net to get a copy of this message | ||
Commit: b2d267d9ee034fa6b502901caa9a81bcc2212755
Author: Christoph M. Becker <cmbecker69@gmx.de> Wed, 31 Aug 2016 16:33:14 +0200
Parents: 314a9f8553625eec8f5cfc60360790533d786bc5
Branches: PHP-5.6 PHP-7..0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=b2d267d9ee034fa6b502901caa9a81bcc2212755
Log:
Fix #71882 amendment 2: Negative ftruncate() on php://memory exhausts memory
Bugs:
https://bugs.php.net/71882
Changed paths:
M ext/standard/tests/file/bug71882.phpt
Diff:
diff --git a/ext/standard/tests/file/bug71882.phpt b/ext/standard/tests/file/bug71882.phpt
index ae0137b..3cb6d85 100644
--- a/ext/standard/tests/file/bug71882.phpt
+++ b/ext/standard/tests/file/bug71882.phpt
@@ -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==