Bug #71417 [Ver->Csd]: fread() does not report zlib.inflate errors
| From: | cmb@php.net | Date: | Mon, 20 Apr 2020 14:49:27 +0000 |
| Subject: | Bug #71417 [Ver->Csd]: fread() does not report zlib.inflate errors | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-226690@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71417&edit=1
ID: 71417
Updated by: cmb@php.net
Reported by: salsi at icosaedro dot it
Summary: fread() does not report zlib.inflate errors
-Status: Verified
+Status: Closed
Type: Bug
Package: Streams related
Operating System: Slackware 14.1
PHP Version: master-Git-2016-01-20 (Git)
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3d1b730c11a4e37884d25bf8af0d5726834986c4
Log: Fix #71417: fread() does not report zlib.inflate errors
Previous Comments:
------------------------------------------------------------------------
[2020-04-17 14:22:41] cmb@php.net
The following pull request has been associated:
Patch Name: Fix #71417: fread() does not report zlib.inflate errors
On GitHub: https://github.com/php/php-src/pull/5408
Patch: https://github.com/php/php-src/pull/5408.patch
------------------------------------------------------------------------
[2020-04-17 13:39:43] cmb@php.net
Related To: Bug #71263
------------------------------------------------------------------------
[2017-12-09 11:02:03] salsi at icosaedro dot it
Probably related to bug #71384 -- see for the general discussion about missing error propagation in
the streams layer.
------------------------------------------------------------------------
[2016-01-21 00:35:22] salsi at icosaedro dot it
Related To: Bug #68556
------------------------------------------------------------------------
[2016-01-20 11:06:39] salsi at icosaedro dot it
...and in general errors that are certainly generated internally to the zlib library are not
reported to the user's application, resulting in missing or no data read at all.
This happens, for example, when an highly compressible stream (say, a source program at least 40 KB
long) that was compressed with a large window (window=15+16), is then decompressed with a smaller
window (window=9+16). In this case fread() simply returns the empty string before the feof() (source
code available).
At this point these issues seem more related to the general implementation of the stream filters
that to a specific filter, but I don't know enough of the internals stuff to tell for sure.
FIX: in the test script above any reference to "bzip2" in the comments should be read
"zlib" :->
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=71417
--
Edit this bug report at https://bugs.php.net/bug.php?id=71417&edit=1