Open VladRassokhin opened 1 week ago
Hex output of the end of such file:
1faafa80: 504b 0606 3100 0000 0000 0000 0000 0000
1faafa90: 0000 0000 0000 0000 767e 0100 0000 0000
1faafaa0: 767e 0100 0000 0000 3063 a700 0000 0000
1faafab0: 5097 031f 0000 0000 04b7 5893 1e50 4b06
1faafac0: 0700 0000 0080 faaa 1f00 0000 0001 0000
1faafad0: 0050 4b05 06ff ffff ffff ffff ffff ffff
1faafae0: ffff ffff ff00 00
I can submit MR in a couple of days. Seems I've found a solution.
Here's a python script which is able to generate a zip64 archive with some data in the zip64 end-of-archive record:
https://gist.github.com/VladRassokhin/9299bb8fbe3169b96e7bc31f91553815
I've copied and adjusted zipfile.ZipFile._write_end_record
Bug report
Bug description:
"Zip64 end of central directory record" may have additional data in the "zip64 extensible data sector" field. In that case, zipfile should use offset from "Zip64 end of central directory locator". Now it's read but ignored.
Problem lies in following code:
While it should be:
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs