Skip to content

Commit 0dbae46

Browse files
mzaslonkakpm00
authored andcommitted
lib/zlib: fix DFLTCC ignoring flush modes when avail_in == 0
This commit is based on: zlib-ng/zlib-ng@40acb3f Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Mikhail Zaslonko <[email protected]> Acked-by: Ilya Leoshkevich <[email protected]> Cc: Heiko Carstens <[email protected]> Cc: Vasily Gorbik <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 195c5ad commit 0dbae46

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/zlib_dfltcc/dfltcc_deflate.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ int dfltcc_deflate(
142142
/* Clear history. */
143143
if (flush == Z_FULL_FLUSH)
144144
param->hl = 0;
145-
*result = need_more;
145+
/* Trigger block post-processing if necessary. */
146+
*result = no_flush ? need_more : block_done;
146147
return 1;
147148
}
148149

0 commit comments

Comments
 (0)