mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8341597: ZipFileInflaterInputStream input buffer size uses uncompressed size
Reviewed-by: lancea
This commit is contained in:
parent
59ac7039d3
commit
f62dba3651
1 changed files with 1 additions and 4 deletions
|
@ -411,13 +411,10 @@ public class ZipFile implements ZipConstants, Closeable {
|
|||
case DEFLATED:
|
||||
// Inflater likes a bit of slack
|
||||
// MORE: Compute good size for inflater stream:
|
||||
long size = CENLEN(zsrc.cen, pos) + 2;
|
||||
long size = CENSIZ(zsrc.cen, pos);
|
||||
if (size > 65536) {
|
||||
size = 8192;
|
||||
}
|
||||
if (size <= 0) {
|
||||
size = 4096;
|
||||
}
|
||||
InputStream is = new ZipFileInflaterInputStream(in, res, (int) size);
|
||||
synchronized (istreams) {
|
||||
istreams.add(is);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue