[PATCH 3/6] Allow zlib to read a pack buffer longer than the actual data
- From
- Hervé Cauwelier <herve@itaapy.com>
- Date
- Oct 14, 2009, 10:37 UTC
- Message-ID
- <1255516669-26745-3-git-send-email-herve@itaapy.com>
- In-Reply-To
- <1255516669-26745-2-git-send-email-herve@itaapy.com>
As we don't know where the compressed data end, only the size of the uncompressed data.
Signed-off-by: Hervé Cauwelier <herve@itaapy.com> --- 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