-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
6u23
-
x86
-
windows_7
FULL PRODUCT VERSION :
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7600]
A DESCRIPTION OF THE PROBLEM :
Error in simple gzip extraction:
InputStream in = new GZIPInputStream(new FileInputStream("woaifayu-ef.dict.dz"));
while (true) {
int l = in.read();
if (l < 0)
break;
}
It reports :
java.util.zip.ZipException: invalid stored block lengths
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
Works perfect in previous versions.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run code:
InputStream in = new GZIPInputStream(new FileInputStream("woaifayu-ef.dict.dz"));
while (true) {
int l = in.read();
if (l < 0)
break;
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Read without exceptions.
ACTUAL -
java.util.zip.ZipException: invalid stored block lengths
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.util.zip.ZipException: invalid stored block lengths
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class Test {
public static void main(String a[]) throws Exception {
InputStream in = new GZIPInputStream(new FileInputStream("woaifayu-ef.dict.dz"));
while (true) {
int l = in.read();
if (l < 0)
break;
}
}
}
---------- END SOURCE ----------
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7600]
A DESCRIPTION OF THE PROBLEM :
Error in simple gzip extraction:
InputStream in = new GZIPInputStream(new FileInputStream("woaifayu-ef.dict.dz"));
while (true) {
int l = in.read();
if (l < 0)
break;
}
It reports :
java.util.zip.ZipException: invalid stored block lengths
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
Works perfect in previous versions.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run code:
InputStream in = new GZIPInputStream(new FileInputStream("woaifayu-ef.dict.dz"));
while (true) {
int l = in.read();
if (l < 0)
break;
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Read without exceptions.
ACTUAL -
java.util.zip.ZipException: invalid stored block lengths
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java.util.zip.ZipException: invalid stored block lengths
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:105)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
public class Test {
public static void main(String a[]) throws Exception {
InputStream in = new GZIPInputStream(new FileInputStream("woaifayu-ef.dict.dz"));
while (true) {
int l = in.read();
if (l < 0)
break;
}
}
}
---------- END SOURCE ----------
- duplicates
-
JDK-7011162 REGRESSION, incorrect header handling of extra gzip fields
-
- Closed
-