]> granicus.if.org Git - php/commitdiff
Fix #71882 amendment: Negative ftruncate() on php://memory exhausts memory
authorChristoph M. Becker <cmbecker69@gmx.de>
Wed, 31 Aug 2016 12:51:37 +0000 (14:51 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Wed, 31 Aug 2016 12:51:37 +0000 (14:51 +0200)
To avoid BC breaks, we do not raise a warning for now.

ext/standard/file.c

index d346ed9e922632e4dc2a64cd49e0b38e355952ae..f3b6df1274864679a3c4880301761f3d7b05b618 100644 (file)
@@ -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;
        }