RFR: 8341625: Improve ZipFile validation of the END header [v2]

Lance Andersen lancea at openjdk.org
Wed Oct 9 15:03:05 UTC 2024


On Mon, 7 Oct 2024 20:00:03 GMT, Lance Andersen <lancea at openjdk.org> wrote:

>> Eirik Bjørsnøs has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - Remove trailing whitespace
>>  - Use a ZIP64 test vector which may be reproduced using InfoZIP
>
> Marked as reviewed by lancea (Reviewer).

> @LanceAndersen
> 
> I figured it would make sense to also reject "negative" values. These are not actually negative, just values larger than `Long.MAX_VALUE` can represent.
> 
> See the [11a275d](https://github.com/openjdk/jdk/commit/11a275d9cc9e8602ad3d190f1c0ca09ff6c04dcd) for the conversion to JUnit 5 and [0f0801c](https://github.com/openjdk/jdk/commit/0f0801c4cee09e36e772314d4343e8c15e39b1dd) which makes the test parameterized to verify that a bunch of bad entry count values are rejected.

No harm, with the extra validation IMHO

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

PR Comment: https://git.openjdk.org/jdk/pull/21384#issuecomment-2402587265


More information about the core-libs-dev mailing list