Thread (9 messages) flat view 9 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH 3/6] Allow zlib to read a pack buffer longer than the actual data

From: Hervé Cauwelier <hidden>
Date: 2016-06-15 22:47:33
Subsystem: the rest · Maintainer: Linus Torvalds

As we don't know where the compressed data end, only the size of the
uncompressed data.

Signed-off-by: Hervé Cauwelier <redacted>
---
 src/odb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/odb.c b/src/odb.c
index 2b4b016..349747b 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -432,7 +432,7 @@ static int inflate_buffer(void *in, size_t inlen, void *out, size_t outlen)
 
 	inflateEnd(&zs);
 
-	if ((status != Z_STREAM_END) || (zs.avail_in != 0))
+	if (status != Z_STREAM_END)
 		return GIT_ERROR;
 
 	if (zs.total_out != outlen)
-- 
1.6.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help