]> granicus.if.org Git - php/commitdiff
Fixed bug #42117 (bzip2.compress loses data in internal buffer)
authorIlia Alshanetsky <iliaa@php.net>
Thu, 9 Aug 2007 23:27:22 +0000 (23:27 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 9 Aug 2007 23:27:22 +0000 (23:27 +0000)
NEWS
ext/bz2/bz2_filter.c

diff --git a/NEWS b/NEWS
index ff434b8f1750d6df72dde8d7abc1c98053c703e7..51d03aa9c6eaf9ca60b52df76210985d3ca66e88 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,8 @@ PHP                                                                        NEWS
 - Fixed bug #42198 (SCRIPT_NAME and PHP_SELF truncated when inside a userdir
   and using PATH_INFO). (Dmitry)
 - Fixed bug #42195 (C++ compiler required always). (Jani)
+- Fixed bug #42117 (bzip2.compress loses data in internal buffer). (Philip,
+  Ilia)
 - Fixed bug #42082 (NodeList length zero should be empty). (Hannes)
 - Fixed bug #41973 (./configure --with-ldap=shared fails with
   LDFLAGS="-Wl,--as-needed"). (Nuno)
index e29346e567648256decb28b64db53192ac9b8ce1..2e642b3bf851c59e7e788ade10c75096fcb366da 100644 (file)
@@ -228,8 +228,8 @@ static php_stream_filter_status_t php_bz2_compress_filter(
 
        if (flags & PSFS_FLAG_FLUSH_CLOSE) {
                /* Spit it out! */
-               status = BZ_OUTBUFF_FULL;
-               while (status == BZ_OUTBUFF_FULL) {
+               status = BZ_FINISH_OK;
+               while (status == BZ_FINISH_OK) {
                        status = BZ2_bzCompress(&(data->strm), BZ_FINISH);
                        if (data->strm.avail_out < data->outbuf_len) {
                                size_t bucketlen = data->outbuf_len - data->strm.avail_out;