]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Allow deflate_quick() to continue processing input data after flushing pending buffer.
authorNathan Moinvaziri <nathan@nathanm.com>
Tue, 25 Feb 2020 13:38:33 +0000 (05:38 -0800)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 30 Apr 2020 18:09:59 +0000 (20:09 +0200)
arch/x86/deflate_quick.c

index a8d15bb4d30f588980456a6e134dfecef36abc24..5cbc653dfd8edda07b014b5ac5bedadd88c100e1 100644 (file)
@@ -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;
             }
         }