com php-src: Fixed bug #72505 (readfile() mangles files larger than 2G): main/streams/streams.c

From: Date: Fri, 16 Sep 2016 12:53:51 +0000
Subject: com php-src: Fixed bug #72505 (readfile() mangles files larger than 2G): main/streams/streams.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-94569@lists.php.net to get a copy of this message
Commit: ac07008bb7eeee46c9e45c976fc3dc264f0eadff Author: Xinchen Hui <laruence@gmail.com> Tue, 28 Jun 2016 11:11:25 +0800 Parents: 46df0642618eabc5b5b7df490d1ae23bda00a745 Branches: PHP-5.6 PHP-7.0 PHP-7.1 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ac07008bb7eeee46c9e45c976fc3dc264f0eadff Log: Fixed bug #72505 (readfile() mangles files larger than 2G) Bugs: https://bugs.php.net/72505 Changed paths: M main/streams/streams.c Diff: diff --git a/main/streams/streams.c b/main/streams/streams.c index f858133..4e00cd1 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -1402,7 +1402,7 @@ PHPAPI size_t _php_stream_passthru(php_stream * stream STREAMS_DC TSRMLS_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);

« previous php.cvs (#94569) next »