diff options
author | Wez Furlong <wez@php.net> | 2005-02-06 23:17:09 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2005-02-06 23:17:09 +0000 |
commit | 056907890104b24db46fda321ee9ae2f6a717f05 (patch) | |
tree | 7a6d8f8b27761bbf59c259878e9a2468621cc80e /main/php_streams.h | |
parent | 1069cefadae79167c893479de46024fc44f2baf0 (diff) | |
download | php-git-056907890104b24db46fda321ee9ae2f6a717f05.tar.gz |
Avoid bug where stream_copy_to_stream() call for precisely 2000000 bytes would
result in entire resource being copied.
The mmap brake is already present inside mmap_range() and is set to 1MB.
Diffstat (limited to 'main/php_streams.h')
-rwxr-xr-x | main/php_streams.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/main/php_streams.h b/main/php_streams.h index dae1fce49c..36a022141c 100755 --- a/main/php_streams.h +++ b/main/php_streams.h @@ -407,10 +407,8 @@ END_EXTERN_C() #define PHP_STREAM_OPTION_RETURN_NOTIMPL -2 /* underlying stream does not implement; streams can handle it instead */ /* copy up to maxlen bytes from src to dest. If maxlen is PHP_STREAM_COPY_ALL, copy until eof(src). - * Uses mmap if the src is a plain file and at offset 0 - * To ensure we don't take up too much memory when reading large files, set the default mmap length - * at this many bytes */ -#define PHP_STREAM_COPY_ALL 2000000 + * Uses mmap if the src is a plain file and at offset 0 */ +#define PHP_STREAM_COPY_ALL ((size_t)-1) BEGIN_EXTERN_C() PHPAPI size_t _php_stream_copy_to_stream(php_stream *src, php_stream *dest, size_t maxlen STREAMS_DC TSRMLS_DC); |