php-src/ext/zlib
Christoph M. Becker 65f5573bc8 Fix #77069: stream filter loses final block of data
Reading from a stream may return greater than zero, but nonetheless the
stream's EOF flag may have been set.  We have to cater to this
condition by setting the close flag for filters.

We also have to cater to that change in the zlib.inflate filter:

If `inflate()` is called with flush mode `Z_FINISH`, but the output
buffer is not large enough to inflate all available data, it fails with
`Z_BUF_ERROR`.  However, `Z_BUF_ERROR` is not fatal; in fact, the zlib
manual states: "If deflate returns with Z_OK or Z_BUF_ERROR, this
function must be called again with Z_FINISH and more output space
(updated avail_out) but no more input data, until it returns with
Z_STREAM_END or an error."  Hence, we do so.

Closes GH-6001.
2020-12-08 11:47:49 +01:00
..
tests Fix #77069: stream filter loses final block of data 2020-12-08 11:47:49 +01:00
config0.m4 Normalize comments in *nix build system m4 files 2019-05-12 18:43:03 +02:00
config.w32 Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
CREDITS
php_zlib.def extend zlib export required for the recent libpng 2017-04-23 21:33:14 +02:00
php_zlib.h Remove local variables 2019-02-03 21:03:00 +01:00
zlib_filter.c Fix #77069: stream filter loses final block of data 2020-12-08 11:47:49 +01:00
zlib_fopen_wrapper.c Report errors from stream read and write operations 2019-07-22 17:17:28 +02:00
zlib.c Allow exceptions in __toString() 2019-06-05 14:25:07 +02:00