Merge pull request #464 from rtyley/development

Tolerate zlib deflation with window size < 32Kb
This commit is contained in:
Vicent Martí 2011-10-24 14:43:18 -07:00
commit c2fbe42346

View File

@ -214,7 +214,7 @@ static int is_zlib_compressed_data(unsigned char *data)
unsigned int w; unsigned int w;
w = ((unsigned int)(data[0]) << 8) + data[1]; 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) static int inflate_buffer(void *in, size_t inlen, void *out, size_t outlen)