summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/torgzip.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/torgzip.c b/src/common/torgzip.c
index c08ed514d8..aca8386cc7 100644
--- a/src/common/torgzip.c
+++ b/src/common/torgzip.c
@@ -348,6 +348,8 @@ tor_zlib_process(tor_zlib_state_t *state,
case Z_STREAM_END:
return TOR_ZLIB_DONE;
case Z_BUF_ERROR:
+ if (state->stream.avail_in == 0)
+ return Z_OK;
return TOR_ZLIB_BUF_FULL;
case Z_OK:
if (state->stream.avail_out == 0)