1
0
mirror of https://github.com/php/php-src.git synced 2026-04-09 00:53:30 +02:00
Files
archived-php-src/main
Christoph M. Becker 31749aac62 Fix #81659: stream_get_contents() may unnecessarily overallocate
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.
2021-11-29 14:46:09 +01:00
..
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00
2019-08-30 16:07:54 +02:00
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00
2020-01-27 13:32:38 +01:00
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00
2020-09-11 14:46:51 +02:00
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00
2019-08-27 14:34:35 +02:00
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00
2021-01-19 11:41:58 +01:00
2021-01-19 11:41:58 +01:00
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00
2021-11-02 16:39:44 +00:00
2021-01-19 11:41:58 +01:00
2019-02-03 21:03:00 +01:00
2019-03-18 02:11:23 +01:00
2019-02-03 21:03:00 +01:00
2019-02-03 21:03:00 +01:00