From ffa8e140ed8b093c60f1238bf76935e815e82a21 Mon Sep 17 00:00:00 2001 From: icebarf Date: Fri, 2 Jun 2023 10:51:21 +0530 Subject: [PATCH] check stream.avail_in as well when looping to inflate gz archive --- src/decompress.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decompress.c b/src/decompress.c index 6ef17db..162f616 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -151,7 +151,7 @@ md5_gz_stream (FILE *source, void *resblock) return -1; accumulate_and_process_md5 (out, MD5_BLOCKSIZE - stream.avail_out, &ctx); - } while (!stream.avail_out); + } while (stream.avail_in && !stream.avail_out); } while (res != Z_STREAM_END); -- 2.40.1