RFR: 8272746: ZipFile can't open big file (NegativeArraySizeException) [v5]

Masanori Yano myano at openjdk.java.net
Tue Jan 18 01:37:04 UTC 2022


> 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.

Masanori Yano has updated the pull request incrementally with one additional commit since the last revision:

  8272746: ZipFile can't open big file (NegativeArraySizeException)

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/6927/files
  - new: https://git.openjdk.java.net/jdk/pull/6927/files/9ebb2a7a..c6b53732

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6927&range=04
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6927&range=03-04

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/6927.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/6927/head:pull/6927

PR: https://git.openjdk.java.net/jdk/pull/6927


More information about the core-libs-dev mailing list