Patch readfile_largefile.patch for Filesystem function related Bug #72505
Patch version 2016-06-27 13:52 UTC
Return to Bug #72505 |
Download this patch
Patch Revisions:
Developer: cschneid@php.net
diff --git a/main/streams/streams.c b/main/streams/streams.c
index d64d5ca..e21d21a 100644
--- a/main/streams/streams.c
+++ b/main/streams/streams.c
@@ -1396,7 +1396,7 @@ PHPAPI size_t _php_stream_passthru(php_stream * stream STREAMS_DC)
if (p) {
do {
/* output functions return int, so pass in int max */
- if (0 < (b = PHPWRITE(p, MIN(mapped - bcount, INT_MAX)))) {
+ if (0 < (b = PHPWRITE(p + bcount, MIN(mapped - bcount, INT_MAX)))) {
bcount += b;
}
} while (b > 0 && mapped > bcount);
|