diff options
Diffstat (limited to 'libjava/classpath/java/util/zip/ZipFile.java')
-rw-r--r-- | libjava/classpath/java/util/zip/ZipFile.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libjava/classpath/java/util/zip/ZipFile.java b/libjava/classpath/java/util/zip/ZipFile.java index 3963bcb..b582c84 100644 --- a/libjava/classpath/java/util/zip/ZipFile.java +++ b/libjava/classpath/java/util/zip/ZipFile.java @@ -261,7 +261,10 @@ public class ZipFile implements ZipConstants if (inp.readLeInt() != CENSIG) throw new ZipException("Wrong Central Directory signature: " + name); - inp.skip(6); + inp.skip(4); + int flags = inp.readLeShort(); + if ((flags & 1) != 0) + throw new ZipException("invalid CEN header (encrypted entry)"); int method = inp.readLeShort(); int dostime = inp.readLeInt(); int crc = inp.readLeInt(); |