com php-src: Fix #71882 amendment: Negative ftruncate() on php://memory exhausts memory: ext/standard/file.c
| From: | Christoph Michael Becker | Date: | Wed, 31 Aug 2016 12:51:37 +0000 |
| Subject: | com php-src: Fix #71882 amendment: Negative ftruncate() on php://memory exhausts memory: ext/standard/file.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-94199@lists.php.net to get a copy of this message | ||
Commit: 314a9f8553625eec8f5cfc60360790533d786bc5
Author: Christoph M. Becker <cmbecker69@gmx.de> Wed, 31 Aug 2016 14:51:37 +0200
Parents: 747b61808bb8df5bbbf821379c5d6905cd5b10a2
Branches: PHP-5.6 PHP-7..0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=314a9f8553625eec8f5cfc60360790533d786bc5
Log:
Fix #71882 amendment: Negative ftruncate() on php://memory exhausts memory
To avoid BC breaks, we do not raise a warning for now.
Bugs:
https://bugs.php.net/71882
Changed paths:
M ext/standard/file.c
Diff:
diff --git a/ext/standard/file.c b/ext/standard/file.c
index d346ed9..f3b6df1 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -1513,7 +1513,7 @@ PHP_NAMED_FUNCTION(php_if_ftruncate)
}
if (size < 0) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Negative size is not supported");
+ /* php_error_docref(NULL TSRMLS_CC, E_WARNING, "Negative size is not supported"); */
RETURN_FALSE;
}