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
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.
java.util.zip.ZipException: extra header info exceeds 256 byte
at java.util.zip.ZipFile.open(Native Method)
// 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)
also, the name is limited in the same way