diff options
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | ext/standard/file.c | 4 | ||||
-rw-r--r-- | ext/standard/streamsfuncs.c | 4 |
3 files changed, 4 insertions, 8 deletions
@@ -10,6 +10,10 @@ PHP NEWS semicolon) (cmb) . Fixed bug #70091 (Phar does not mark UTF-8 filenames in ZIP archives). (cmb) +- Standard: + . Fixed bug #80654 (file_get_contents() maxlen fails above (2**31)-1 bytes). + (cmb) + - Zip: . Fixed bug #80648 (Fix for bug 79296 should be based on runtime version). (cmb, Remi) diff --git a/ext/standard/file.c b/ext/standard/file.c index 12c21c93cd..3bd3421603 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -564,10 +564,6 @@ PHP_FUNCTION(file_get_contents) RETURN_FALSE; } - if (maxlen > INT_MAX) { - php_error_docref(NULL, E_WARNING, "maxlen truncated from " ZEND_LONG_FMT " to %d bytes", maxlen, INT_MAX); - maxlen = INT_MAX; - } if ((contents = php_stream_copy_to_mem(stream, maxlen, 0)) != NULL) { RETVAL_STR(contents); } else { diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 68ad6483e8..907feba741 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -456,10 +456,6 @@ PHP_FUNCTION(stream_get_contents) } } - if (maxlen > INT_MAX) { - php_error_docref(NULL, E_WARNING, "maxlen truncated from " ZEND_LONG_FMT " to %d bytes", maxlen, INT_MAX); - maxlen = INT_MAX; - } if ((contents = php_stream_copy_to_mem(stream, maxlen, 0))) { RETURN_STR(contents); } else { |