mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-23 21:38:19 +00:00
Merge pull request #464 from rtyley/development
Tolerate zlib deflation with window size < 32Kb
This commit is contained in:
commit
c2fbe42346
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user