diff options
| author | Antony Dovgal <tony2001@php.net> | 2006-07-13 12:00:17 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2006-07-13 12:00:17 +0000 |
| commit | 4902fc6c25d91b3a97656ef84b8382d1d1da5b24 (patch) | |
| tree | 45d57c8c1ba5fa4fd5f0bc28fed31953f2eea67f /main | |
| parent | 1784db8087c3bb2dcbd41eaab56c8196a8b0530f (diff) | |
| download | php-git-4902fc6c25d91b3a97656ef84b8382d1d1da5b24.tar.gz | |
MFH: fix #38086 (stream_copy_to_stream() returns 0 when maxlen is bigger than the actual length)
add tests
Diffstat (limited to 'main')
| -rwxr-xr-x | main/streams/streams.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/main/streams/streams.c b/main/streams/streams.c index 1f087f8879..12a6fa4d29 100755 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1348,11 +1348,7 @@ PHPAPI size_t _php_stream_copy_to_stream(php_stream *src, php_stream *dest, size writeptr += didwrite; } } else { - if (maxlen == 0) { - return haveread; - } else { - return 0; /* error */ - } + return haveread; } if (maxlen - haveread == 0) { |
