Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Sergey Bylokhov
On Tue, 15 Aug 2023 21:38:41 GMT, Volker Simonis wrote: > Did you create that zip file manually or was it created by a tool and if by a > tool than which one? I think we must differentiate here between functional > compatibility with a tool like "zip", compatibility with a specification and >

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Volker Simonis
On Tue, 15 Aug 2023 21:05:16 GMT, Sergey Bylokhov wrote: > I have provided a test.zip file above which passed the zip integrity test via > "zip -T" and can be unzip w/o errors, but rejected by the openjdk. That zip > was created based on the actual specification, and not on the wiki. Did you c

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Sergey Bylokhov
On Tue, 15 Aug 2023 17:56:09 GMT, Volker Simonis wrote: >This seems to be a very "free" interpretation of the specification to me. >According to my understanding, the valid sizes of 8, 16, 24 or 28 as described >in the Wikipedia article are a direct consequence of the specification. I have pro

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Lance Andersen
On Tue, 15 Aug 2023 18:13:16 GMT, Alan Bateman wrote: >> Reworked similar to above. > >> Reworked similar to above. > > Thanks. Related is that there aren't tests in this PR that run with > -Djdk.util.zip.disableZip64ExtraFieldValidation and > -D"jdk.util.zip.disableZip64ExtraFieldValidation=t

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Alan Bateman
On Tue, 15 Aug 2023 16:36:34 GMT, Lance Andersen wrote: > Reworked similar to above. Thanks. Related is that there aren't tests in this PR that run with -Djdk.util.zip.disableZip64ExtraFieldValidation and -D"jdk.util.zip.disableZip64ExtraFieldValidation=true to check that zip implementations

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Volker Simonis
On Tue, 15 Aug 2023 16:01:37 GMT, Sergey Bylokhov wrote: > Other than that there are no limitation on the size of extended block, it > could be 0, 20, 100 , etc. But it should contain correct data if necessary > and should not be larger than the surrounding "chunk". This seems to be a very "fr

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Lance Andersen
On Tue, 15 Aug 2023 10:21:42 GMT, Alan Bateman wrote: >> Lance Andersen has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add additional zip to the DataProvider so it is exercised > > src/java.base/share/classes/java/util/zip/ZipFile.java

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Sergey Bylokhov
On Tue, 15 Aug 2023 10:49:37 GMT, Alan Bateman wrote: > Are you arguing to drop all checking of the extra fields? It's not clear to > me that this PR should be do that as it has a lot of implications. Not all, but do it in a different way. The only thing which is MUST be implemented according

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Lance Andersen
On Tue, 15 Aug 2023 00:07:01 GMT, Sergey Bylokhov wrote: > [TEST.zip](https://github.com/openjdk/jdk/files/12340301/TEST.zip) > > try this example, zip -T passed, unzip works fine, but openjdk rejects it. Yes, the Zip64 header in the CEN has a field size of 2 and as we are validating the Zip64

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Alan Bateman
On Tue, 15 Aug 2023 00:07:01 GMT, Sergey Bylokhov wrote: > try this example, zip -T passed, unzip works fine, but openjdk rejects it. Are you arguing to drop all checking of the extra fields? It's not clear to me that this PR should be do that as it has a lot of implications. - PR

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-15 Thread Alan Bateman
On Mon, 14 Aug 2023 21:21:30 GMT, Lance Andersen wrote: >> This PR updates the extra field validation added as part of >> [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with >> issues seen with 3rd party tools/libraries where a ZipException may be >> encountered when open

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-14 Thread Sergey Bylokhov
On Mon, 14 Aug 2023 21:21:30 GMT, Lance Andersen wrote: >> This PR updates the extra field validation added as part of >> [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with >> issues seen with 3rd party tools/libraries where a ZipException may be >> encountered when open

Re: RFR: 8313765: Invalid CEN header (invalid zip64 extra data field size) [v6]

2023-08-14 Thread Lance Andersen
> This PR updates the extra field validation added as part of > [JDK-8302483](https://bugs.openjdk.org/browse/JDK-8302483) to deal with > issues seen with 3rd party tools/libraries where a ZipException may be > encountered when opening select APK, ZIP or JAR files. Please see refer to > the