浏览代码

Revert unnecessary zlib_inflate/inftrees.c fix

It turns out that empty distance code tables are not an error, and that
a compressed block with only literals can validly have an empty table
and should not be flagged as a data error.

Some old versions of gzip had problems with this case, but it does not
affect the zlib code in the kernel.

Analysis and explanations thanks to Sergey Vlasov <vsu@altlinux.ru>

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Linus Torvalds 20 年之前
父节点
当前提交
c231c7db30
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/zlib_inflate/inftrees.c

+ 1 - 1
lib/zlib_inflate/inftrees.c

@@ -141,7 +141,7 @@ static int huft_build(
   {
     *t = NULL;
     *m = 0;
-    return Z_DATA_ERROR;
+    return Z_OK;
   }