aboutsummaryrefslogtreecommitdiffstats
path: root/g10/compress.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/compress.c')
-rw-r--r--g10/compress.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/g10/compress.c b/g10/compress.c
index e7a6f2b11..777ef47fb 100644
--- a/g10/compress.c
+++ b/g10/compress.c
@@ -100,6 +100,9 @@ do_compress( compress_filter_context_t *zfx, z_stream *zs, int flush, IOBUF a )
int zrc;
unsigned n;
+ if (flush == Z_NO_FLUSH && zs->avail_in == 0)
+ return 0;
+
do {
zs->next_out = BYTEF_CAST (zfx->outbuf);
zs->avail_out = zfx->outbufsize;