You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47163af9b6
Previously, a Zip64 jar file was identified by the number of entries in the central directory being 0xFFFF. This value indicates that there the number of entries is too big for the 2-byte field. However, a jar may be in Zip64 format due to it exceeding the Zip format's maximum size rather than its maximum number of entries so this field cannot be used as a reliable indicator. The Zip specification doesn't require any of the fields of the end of central directory record to have a value of 0xFFFF (2-byte fields) or 0xFFFFFFFF (4-byte fields) when using Zip64 format so we need to take a different approach. Additionally, a number of places in the code assumed that an entry's offset would always be available from the central directory file header directly. This assumption did not hold true when the jar was a Zip64 archive due to its size as the offset's value would be 0xFFFFFFF indicating that it should be read from the Zip64 extended information field within the header's extra field instead. This commit updates the Zip64 detection to look for the Zip64 end of central directory locator instead. If present, it begins 20 bytes before the beginning of the end of central directory record. Its first four bytes are always 0x07064b50. The code that reads the local header offset has also been updated to refer to the Zip64 extended information field when the offset is too large to fit in the 4-byte field in the central directory file header. To allow greater-than-4-byte offsets to be handled, a number of fields, method parameters, and local variables have had their type changed from an int to a long. Fixes gh-27822 |
3 years ago | |
---|---|---|
.. | ||
spring-boot-antlib | 4 years ago | |
spring-boot-autoconfigure-processor | 4 years ago | |
spring-boot-buildpack-platform | 3 years ago | |
spring-boot-configuration-metadata | 3 years ago | |
spring-boot-configuration-processor | 3 years ago | |
spring-boot-gradle-plugin | 3 years ago | |
spring-boot-jarmode-layertools | 4 years ago | |
spring-boot-loader | 3 years ago | |
spring-boot-loader-tools | 3 years ago | |
spring-boot-maven-plugin | 3 years ago | |
spring-boot-test-support | 3 years ago |