8226530: ZipFile reads wrong entry size from ZIP64 entries

Reviewed-by: bpb, clanger, shade
This commit is contained in:
Lance Andersen 2019-08-07 14:04:10 -04:00
parent 2b164a34ad
commit 5233e25c4c
4 changed files with 180 additions and 16 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -321,7 +321,7 @@ class ZipInputStream extends InflaterInputStream implements ZipConstants {
byte[] extra = new byte[len];
readFully(extra, 0, len);
e.setExtra0(extra,
e.csize == ZIP64_MAGICVAL || e.size == ZIP64_MAGICVAL);
e.csize == ZIP64_MAGICVAL || e.size == ZIP64_MAGICVAL, true);
}
return e;
}