diff options
author | Joe Watkins <krakjoe@php.net> | 2019-10-03 06:51:33 +0200 |
---|---|---|
committer | Joe Watkins <krakjoe@php.net> | 2019-10-03 06:51:56 +0200 |
commit | de83036f13cb48381f61d804cfdffbae8605c1f0 (patch) | |
tree | dcfc6a47686b5fdcdfdcea45dffbd8d416d0e7fa /main/streams | |
parent | a46bdcb6319306131fbb33a7721a1ede742e8421 (diff) | |
parent | 5b1bb23edfbdf00cfafa9655cf07ef99546cdfa8 (diff) | |
download | php-git-de83036f13cb48381f61d804cfdffbae8605c1f0.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #76859 stream_get_line skips data if used with data-generating filter
Diffstat (limited to 'main/streams')
-rw-r--r-- | main/streams/filter.c | 2 | ||||
-rw-r--r-- | main/streams/streams.c | 4 |
2 files changed, 0 insertions, 6 deletions
diff --git a/main/streams/filter.c b/main/streams/filter.c index 7fdbd0c3bf..f536b92a02 100644 --- a/main/streams/filter.c +++ b/main/streams/filter.c @@ -360,8 +360,6 @@ PHPAPI int php_stream_filter_append_ex(php_stream_filter_chain *chain, php_strea case PSFS_PASS_ON: /* If any data is consumed, we cannot rely upon the existing read buffer, as the filtered data must replace the existing data, so invalidate the cache */ - /* note that changes here should be reflected in - main/streams/streams.c::php_stream_fill_read_buffer */ stream->writepos = 0; stream->readpos = 0; diff --git a/main/streams/streams.c b/main/streams/streams.c index aef1ebe762..1f6fc89a79 100644 --- a/main/streams/streams.c +++ b/main/streams/streams.c @@ -534,10 +534,6 @@ PHPAPI int _php_stream_fill_read_buffer(php_stream *stream, size_t size) php_stream_bucket_brigade brig_in = { NULL, NULL }, brig_out = { NULL, NULL }; php_stream_bucket_brigade *brig_inp = &brig_in, *brig_outp = &brig_out, *brig_swap; - /* Invalidate the existing cache, otherwise reads can fail, see note in - main/streams/filter.c::_php_stream_filter_append */ - stream->writepos = stream->readpos = 0; - /* allocate a buffer for reading chunks */ chunk_buf = emalloc(stream->chunk_size); |