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 18:27:31 UTC 2024
On Fri, 29 Mar 2024 17:38:47 GMT, Liam Miller-Cushon <cushon at openjdk.org> wrote:
>> This change fixes a zip64 bug in the launcher that is prevent it from reading the manifest of jars where the 'relative offset of local header' field in the central directory entry is >4GB. As described in APPNOTE.TXT 4.5.3, the offset is too large to be stored in the central directory it is stored in a 'Zip64 Extended Information Extra Field'.
>
> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
>
> Maximum Zip64 extra field length is 32
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?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18479#discussion_r1544752292
More information about the core-libs-dev
mailing list