mirror of
https://github.com/php/php-src.git
synced 2026-04-10 09:33:06 +02:00
Since we're going to read from the current stream position anyway, the `max_len` should be the size of the file minus the current position (still catering to potentially filtered streams). We must, however, make sure to cater to the file position being beyond the actual file size. While we're at, we also fix the step size in the comment, which is 8K. A further optimization could be done for unfiltered streams, thus saving that step size, but 8K might not be worth it. Closes GH-7693.