diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2021-02-16 19:36:37 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2021-02-22 15:28:46 +0100 |
commit | 963e50c8c48ecfbe7444445e5ca8e33530d630d0 (patch) | |
tree | bbd3603cc050f492eddb065e98a37ea3879a46fb /main/php_streams.h | |
parent | 073b6ea818286fe838097d49f92ae379d5f217f0 (diff) | |
download | php-git-963e50c8c48ecfbe7444445e5ca8e33530d630d0.tar.gz |
Fix #75776: Flushing streams with compression filter is broken
First, the `bzip2.compress` filter has the same issue as `zlib.deflate`
so we port the respective fix[1] to ext/bz2.
Second, there is still an issue, if a stream with an attached
compression filter is flushed before it is closed, without any writes
in between. In that case, the compression is never finalized. We fix
this by enforcing a `_php_stream_flush()` with the `closing` flag set
in `_php_stream_free()`, whenever a write filter is attached. This
call is superfluous for most write filters, but does not hurt, even
when it is unnecessary.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=20e75329f2adb11dd231852c061926d0e4080929>
Closes GH-6703.
Diffstat (limited to 'main/php_streams.h')
0 files changed, 0 insertions, 0 deletions