Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2049059 | 1.4.1 | Konstantin Kladko | P2 | Closed | Fixed | hopper |
JDK-2049058 | 1.4.0_01 | Konstantin Kladko | P2 | Resolved | Fixed | 01 |
Name: pa48320 Date: 11/15/2001
When reading an archive, the constructor for java.util.zip.ZipFile is called so that we can read the file.
The constructor for ZipFile throws an exception when the zip entry contains an extra field that is greater than 256 bytes.
This prevents me from reading the file as this exception will always be thrown if the extra field is greater than
256 bytes.
The Java API (via the java.util.zip.ZipEntry class) allows me to create a zip entry that contains an extra field
up to 0xFFFFF bytes in length. Therefore the read should not limit this field to 256 bytes.
This bug exists for 1.4.0-beta3, 1.3.1.01, and 1.3.0_01. This bug does not exist in the 1.2.2 version.
Output:
java.util.zip.ZipException: extra header info exceeds 256 byte
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:110)
at java.util.zip.ZipFile.<init>(ZipFile.java:75)
Code Snippet:
try
{
// where the zip file identified by name, has an extra field > 256 bytes
ZipFile zipFile = new ZipFile(name);
}
catch (ZipException e)
{
}
This is a regression that needs to be fixed to support current and future products.
This has been tested and found to be a problem in the following versions:
java version "1.4.0-beta3"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta3-b84)
Java HotSpot(TM) Client VM (build 1.4.0-beta3-b84, mixed mode)
java version "1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01a)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
java version "1.3.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)
======================================================================
###@###.### 2001-11-21
also, the name is limited in the same way
- backported by
-
JDK-2049058 the constructor for java.util.zip.ZipFile throws java.util.zip.ZipException: ex
- Resolved
-
JDK-2049059 the constructor for java.util.zip.ZipFile throws java.util.zip.ZipException: ex
- Closed