提交 291ec0f2 编写于 作者: L Linus Torvalds

Don't special-case a zero-sized compression.

zlib actually writes a header for that case, and while ignoring that
header will get us the right data, it will also end up messing up our
stream position.  So we actually want zlib to "uncompress" even an empty
object.
上级 72347a23
......@@ -55,8 +55,6 @@ static void *get_data(unsigned long size)
z_stream stream;
void *buf = xmalloc(size);
if (!size)
return buf;
memset(&stream, 0, sizeof(stream));
stream.next_out = buf;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册