RFR: 8328995: launcher can't open jar files where the offset of the manifest is >4GB [v4]

Jiangli Zhou jiangli at openjdk.org
Fri Mar 29 19:57:31 UTC 2024


On Fri, 29 Mar 2024 18:41:09 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:

>> src/java.base/share/native/libjli/parse_manifest.c line 197:
>> 
>>> 195:   jlong cenoff = CENOFF(cenhdr);
>>> 196:   jlong cenext = CENEXT(cenhdr);
>>> 197:   if (cenoff == ZIP64_MAGICVAL && cenext > 0) {
>> 
>> Probably also need to check if `cenlen` or `censiz` is ZIP64_MAGICVAL?
>
> I think it doesn't matter, because the validation below only uses `cenoff`. If `cenoff` fits in 32 bits, we don't need to read the zip64 extra info.

Thanks for the explanation. Could you please add a comment with the info above the `if` statement?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18479#discussion_r1544820598


More information about the core-libs-dev mailing list