mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8226530: ZipFile reads wrong entry size from ZIP64 entries
Reviewed-by: bpb, clanger, shade
This commit is contained in:
parent
2b164a34ad
commit
5233e25c4c
4 changed files with 180 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 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
|
||||
|
@ -673,7 +673,7 @@ class ZipFile implements ZipConstants, Closeable {
|
|||
e.method = CENHOW(cen, pos);
|
||||
if (elen != 0) {
|
||||
int start = pos + CENHDR + nlen;
|
||||
e.setExtra0(Arrays.copyOfRange(cen, start, start + elen), true);
|
||||
e.setExtra0(Arrays.copyOfRange(cen, start, start + elen), true, false);
|
||||
}
|
||||
if (clen != 0) {
|
||||
int start = pos + CENHDR + nlen + elen;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue