Commit 4e4a7005038b712a91a32e48078cec54b4e8a24c

Stefan Sperling 2019-04-13T16:29:53

flush compressed output in got_deflate_read()

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/deflate.c b/lib/deflate.c
index def641f..bb2a535 100644
--- a/lib/deflate.c
+++ b/lib/deflate.c
@@ -98,7 +98,7 @@ got_deflate_read(struct got_deflate_buf *zb, FILE *f, size_t *outlenp)
 				if (ferror(f))
 					return got_ferror(f, GOT_ERR_IO);
 				/* EOF */
-				ret = Z_STREAM_END;
+				ret = deflate(z, Z_FINISH);
 				break;
 			}
 			z->next_in = zb->inbuf;