Name: skT88420 Date: 11/10/99
java version "1.2.2"
Classic VM (build JDK-1.2.2-W, native threads, symcjit)
Core dump occurs when you try to use an enumeration returned from a
ZipFile.entries() method if you try to access the enumeration after closing the
ZipFile.
This should throw an IllegalStateException if the ZipFile has been closed.
public static void main(String[] args) {
try {
File f = new File("empty.zip");
ZipFile zip = new ZipFile(f);
Enumeration e = zip.entries();
zip.close();
for (; e.hasMoreElements();) {
System.out.println("Entry Name: " + ((ZipEntry)e.nextElement()).getName());
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
(Review ID: 97692)
======================================================================
- duplicates
-
JDK-4358673 If ZipFile.entries() is enumerated the VM can crash - EXCEPTION_ACCESS_VIOLATION
-
- Closed
-