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

Liam Miller-Cushon cushon at openjdk.org
Wed Mar 27 16:05:44 UTC 2024


On Wed, 27 Mar 2024 03:18:42 GMT, Jiangli Zhou <jiangli at openjdk.org> wrote:

>> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix disk number size
>
> src/java.base/share/native/libjli/manifest_info.h line 59:
> 
>> 57: #define ZIP64_EXTID   1       // Extra field Zip64 header ID
>> 58: 
>> 59: #define ZIP64_EXTMAXLEN 36 // Maximum Zip64 extra field length
> 
> The fields described in APPNOTE-6.3.9.TXT 4.5.3 are total 32 bytes. Any other additional fields in the Zip64 extended information?
> 
> 
>         Value      Size       Description
>         -----      ----       -----------
> (ZIP64) 0x0001     2 bytes    Tag for this "extra" block type
>         Size       2 bytes    Size of this "extra" block
>         Original 
>         Size       8 bytes    Original uncompressed file size
>         Compressed
>         Size       8 bytes    Size of compressed data
>         Relative Header
>         Offset     8 bytes    Offset of local header record
>         Disk Start
>         Number     4 bytes    Number of the disk on which
>                               this file starts

Thanks for the catch, I had missed that the disk start number is 4 bytes and not 8. I pushed a commit. I also removed some unused references to the disk number, which is only being used to validate the size of the zip64 extended info.

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

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


More information about the core-libs-dev mailing list