summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <tanoku@gmail.com>2011-10-24 14:43:18 -0700
committerVicent Martí <tanoku@gmail.com>2011-10-24 14:43:18 -0700
commitc2fbe423465e1fa02a7e681f6b4aaee877e3de03 (patch)
treea1de54628898508cf1eafec82ab4d696b843d8b3
parent4ce16ed82f658e242ffa91ce0abf98dfe45a04ad (diff)
parentc51065e3e9f150fc7284d8a890f16e4076aeb948 (diff)
downloadlibgit2-c2fbe423465e1fa02a7e681f6b4aaee877e3de03.tar.gz
Merge pull request #464 from rtyley/development
Tolerate zlib deflation with window size < 32Kb
-rw-r--r--src/odb_loose.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/odb_loose.c b/src/odb_loose.c
index 80f0aa9e7..dbfe18b43 100644
--- a/src/odb_loose.c
+++ b/src/odb_loose.c
@@ -214,7 +214,7 @@ static int is_zlib_compressed_data(unsigned char *data)
unsigned int w;
w = ((unsigned int)(data[0]) << 8) + data[1];
- return data[0] == 0x78 && !(w % 31);
+ return (data[0] & 0x8F) == 0x08 && !(w % 31);
}
static int inflate_buffer(void *in, size_t inlen, void *out, size_t outlen)