[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_off

[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 data