php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login

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);
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 16:01:29 2024 UTC