summaryrefslogtreecommitdiff
path: root/ext/bz2
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2007-08-09 23:27:22 +0000
committerIlia Alshanetsky <iliaa@php.net>2007-08-09 23:27:22 +0000
commit6a752ac6df5d4dc425868eae78d5ded46f682f1b (patch)
tree6c8125b14cab0b924af8192bc331f50a4df885eb /ext/bz2
parent31264450737f394de75c08ace6c14eb713daf245 (diff)
downloadphp-git-6a752ac6df5d4dc425868eae78d5ded46f682f1b.tar.gz
Fixed bug #42117 (bzip2.compress loses data in internal buffer)
Diffstat (limited to 'ext/bz2')
-rw-r--r--ext/bz2/bz2_filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c
index e29346e567..2e642b3bf8 100644
--- a/ext/bz2/bz2_filter.c
+++ b/ext/bz2/bz2_filter.c
@@ -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;