> ZipInputStream.readLOC() calls ZipEntry.setExtra0() without translating 
> IllegalArgumentException into ZipException. setExtra0() rejects a local entry 
> when the combined central-header size, entry name, and extra field exceeds 
> 65535 bytes.
> 
> For example, an empty entry name with an extra-field length of 65490 causes 
> IllegalArgumentException from getNextEntry(). The same input also causes the 
> JarInputStream constructor to throw the unchecked exception instead of its 
> documented IOException.
> 
> Malformed local headers should be rejected with ZipException. The exception 
> translation should cover both entry creation and extra-field processing so 
> that all invalid LOC length combinations follow the public IOException 
> contract.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Timofei Fedotov has refreshed the contents of this pull request, and previous 
commits have been removed. The incremental views will show differences compared 
to the previous content of the PR. The pull request contains one new commit 
since the last revision:

  8398547: Oversized LOC extra field causes IllegalArgumentException in 
ZipInputStream

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/34120/files
  - new: https://git.openjdk.org/jdk/pull/34120/files/5b7c59a6..f4dcccd9

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=34120&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=34120&range=00-01

  Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/34120.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/34120/head:pull/34120

PR: https://git.openjdk.org/jdk/pull/34120

Reply via email to