From: Nathan Moinvaziri Date: Tue, 25 Feb 2020 13:38:33 +0000 (-0800) Subject: Allow deflate_quick() to continue processing input data after flushing pending buffer. X-Git-Tag: 1.9.9-b1~316 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=343596fc98a0d7a6283dbe5d25abefca18439184;p=thirdparty%2Fzlib-ng.git Allow deflate_quick() to continue processing input data after flushing pending buffer. --- diff --git a/arch/x86/deflate_quick.c b/arch/x86/deflate_quick.c index a8d15bb4d..5cbc653df 100644 --- a/arch/x86/deflate_quick.c +++ b/arch/x86/deflate_quick.c @@ -203,7 +203,7 @@ ZLIB_INTERNAL block_state deflate_quick(deflate_state *s, int flush) { do { if (s->pending + 4 >= s->pending_buf_size) { flush_pending(s->strm); - if (flush != Z_FINISH) { + if (s->strm->avail_in == 0 && flush != Z_FINISH) { return need_more; } }