Integrated: 8272746: ZipFile can't open big file (NegativeArraySizeException)
Masanori Yano
myano at openjdk.java.net
Tue Jan 18 18:24:40 UTC 2022
On Thu, 23 Dec 2021 10:55:08 GMT, Masanori Yano <myano at openjdk.org> wrote:
> Could you please review the JDK-8272746 bug fixes?
> Since the array index is of type int, the overflow occurs when the value of end.cenlen is too large because of too many entries.
> It is necessary to read a part of the CEN from the file to fix the problem fundamentally, but the way will require an extensive fix and degrade performance.
> In practical terms, the size of the central directory rarely grows that large. So, I fixed it to check the size of the central directory and throw an exception if it is too large.
This pull request has now been integrated.
Changeset: 848b16a3
Author: Masanori Yano <myano at openjdk.org>
Committer: Lance Andersen <lancea at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/848b16a3f933c1cffbce93337a5d9b4e48ce4b45
Stats: 92 lines in 2 files changed: 92 ins; 0 del; 0 mod
8272746: ZipFile can't open big file (NegativeArraySizeException)
Reviewed-by: lancea
-------------
PR: https://git.openjdk.java.net/jdk/pull/6927
More information about the core-libs-dev
mailing list