提交 7fed62ab 编写于 作者: S sherman

8044727: Problem reading the contents of some zip files

Summary: zis.readLOC() should not interpret ZIP64 data in extra field, if not necessary
Reviewed-by: alanb
上级 2da86e19
...@@ -319,7 +319,8 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants { ...@@ -319,7 +319,8 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
if (len > 0) { if (len > 0) {
byte[] extra = new byte[len]; byte[] extra = new byte[len];
readFully(extra, 0, len); readFully(extra, 0, len);
e.setExtra0(extra, true); e.setExtra0(extra,
e.csize == ZIP64_MAGICVAL || e.size == ZIP64_MAGICVAL);
} }
return e; return e;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册