[issue44067] Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT

2021-11-06 Thread anadius
Change by anadius : -- nosy: +alanmcintyre, serhiy.storchaka, twouters ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44067] Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT

2021-11-04 Thread anadius
anadius added the comment: I was looking at `zipfile._strip_extra` trying to figure out how it works. It doesn't. It skips extra headers after the last one that matches. That's what causes this issue. Here's a fixed version: def _strip_extra(extra, xids): # Remove Extra Fields with

[issue44067] Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT

2021-05-07 Thread AMRIT RAI
AMRIT RAI added the comment: The issue stems from the following code inside the def _write_end_record(self): method ,where the extra fields are trimmed . if zinfo.header_offset > ZIP64_LIMIT: extra.append(zinfo.header_offset) header_offset = 0x else: header_offset =

[issue44067] Zipfile lib overwrites the extra field during closing when the archive size is more then ZIP64_LIMIT

2021-05-07 Thread AMRIT RAI
New submission from AMRIT RAI : The current zipFile implementation supports the allowZip64,which can make large zip files. There is a bug in the current implementation of close method ,where the extra field is overwritten . To reproduce it : 1.Create a directory with more then 4 GB of