mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fixed bug #47997 (stream_copy_to_stream returns 1 on empty streams)
This commit is contained in:
parent
0c6cf02985
commit
14c717f449
6 changed files with 53 additions and 14 deletions
|
@ -420,9 +420,14 @@ END_EXTERN_C()
|
|||
* Uses mmap if the src is a plain file and at offset 0 */
|
||||
#define PHP_STREAM_COPY_ALL ((size_t)-1)
|
||||
|
||||
#define PHP_STREAM_FAILURE ((size_t)-1)
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_ATTRIBUTE_DEPRECATED
|
||||
PHPAPI size_t _php_stream_copy_to_stream(php_stream *src, php_stream *dest, size_t maxlen STREAMS_DC TSRMLS_DC);
|
||||
#define php_stream_copy_to_stream(src, dest, maxlen) _php_stream_copy_to_stream((src), (dest), (maxlen) STREAMS_CC TSRMLS_CC)
|
||||
PHPAPI size_t _php_stream_copy_to_stream_ex(php_stream *src, php_stream *dest, size_t maxlen STREAMS_DC TSRMLS_DC);
|
||||
#define php_stream_copy_to_stream_ex(src, dest, maxlen) _php_stream_copy_to_stream_ex((src), (dest), (maxlen) STREAMS_CC TSRMLS_CC)
|
||||
|
||||
|
||||
/* read all data from stream and put into a buffer. Caller must free buffer when done.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue