#40189 [Opn->Csd]: endless loop in zlib.inflate stream filter
ID: 40189
Updated by: cellog@php.net
Reported By: cellog@php.net
-Status: Open
+Status: Closed
Bug Type: Zlib Related
Operating System: kubuntu linux
PHP Version: 5CVS-2007-01-22 (CVS)
Assigned To: cellog
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
fixed in HEAD, PHP_5_2, PHP_5_3
Previous Comments:
------------------------------------------------------------------------
[2008-01-12 20:03:19] cellog@php.net
the fix for this bug unfortunately is incorrect, and can result in
truncation of valid gzipped data. The correct fix is to look for
Z_STREAM_END and to flush if it is returned. Currently, Z_OK and
Z_STREAM_END are treated identically. I need to look at bz2 and see if
the same fix needs to happen there.
------------------------------------------------------------------------
[2007-01-25 12:22:56] tony2001@php.net
Patch committed (+ I ported the same patch to ext/bz2).
------------------------------------------------------------------------
[2007-01-23 23:58:53] cellog@php.net
last detail: I have a 64-bit machine, not sure if that
matters or not, but there you go
------------------------------------------------------------------------
[2007-01-23 23:57:55] cellog@php.net
not sure what this cvs update -f business was. Forget
that. Use this to reproduce the bug:
cd pecl/phar
cvs update -D "Jan 22 01:00:00 2007 UTC"
ln -s ~/php5/ext/phar ~/pecl/phar
cd ~/php5
./configure --enable-debug --enable-phar --with-zlib
make cli
cd ext/phar/tests
~/php5/sapi/cli/php phar_ctx_001.phpt
~/php5/sapi/cli/php phar_ctx_001.phpt
or
~/php5/sapi/cli/php phar_oo_compressed_001.phpt
~/php5/sapi/cli/php phar_oo_compressed_001.phpt
(sometimes it only happened on the 2nd run for me)
------------------------------------------------------------------------
[2007-01-22 14:44:59] cellog@php.net
cvs update -f "Jan 22 02:07:44 2007 UTC"
I committed a workaround for the failure, completely
forgetting you needed the file for this bug, sorry. This
is the patch that needs to be reversed:
http://cvs.php.net/viewvc.cgi/pecl/phar/phar.c?r1=1.135&r2=1.136
------------------------------------------------------------------------
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
http://bugs.php.net/40189
--
Edit this bug report at http://bugs.php.net/?id=40189&edit=1
Thread (10 messages)