On Thu, 23 Dec 2021 16:42:50 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> Masanori Yano has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   8272746: ZipFile can't open big file (NegativeArraySizeException)
>
> src/java.base/share/classes/java/util/zip/ZipFile.java line 1501:
> 
>> 1499:                 // read in the CEN and END
>> 1500:                 if (end.cenlen + ENDHDR >= Integer.MAX_VALUE) {
>> 1501:                     zerror("invalid END header (too large central 
>> directory size)");
> 
> This check looks correct. It might be a bit clearer to say that "central 
> directory size too large" rather than "too large central directory size".
> 
> The bug report says that JDK 8 and the native zip handle these zip files, 
> were you able to check that?

> @AlanBateman Could you please review the above comments.

Thanks for changing the message, the update to ZipFile looks good to me 
although I'm still surprised that the native tools support a CEN larger than 
2Gb.

I'm slow to add myself as a Reviewer because I'm concerned about the test. I 
ran it on a couple of systems and it take several minutes to create the ZIP 
file. This test may potentially run concurrently with other I/O bound tests and 
I'm concerned about intermittent timeouts. @LanceAndersen - do you have any 
opinions on this?

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

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

Reply via email to