On Thu, 3 Dec 2026 13:34:24 GMT, Timofei Fedotov <[email protected]> wrote:

>> 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 updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Split oversized name regression tests

@Sovtouch 
Your change (at version c395b13e4e7e1af8dc2413cf8d534f230e2041e9) is now ready 
to be sponsored by a Committer.

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

PR Comment: https://git.openjdk.org/jdk/pull/34121#issuecomment-7380983956

Reply via email to