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
--- a/jdk/src/share/classes/java/util/zip/ZipInputStream.java Wed Jun 04 11:25:13 2014 -0700
+++ b/jdk/src/share/classes/java/util/zip/ZipInputStream.java Wed Jun 04 14:00:19 2014 -0700
@@ -319,7 +319,8 @@
if (len > 0) {
byte[] extra = new byte[len];
readFully(extra, 0, len);
- e.setExtra0(extra, true);
+ e.setExtra0(extra,
+ e.csize == ZIP64_MAGICVAL || e.size == ZIP64_MAGICVAL);
}
return e;
}