Title: Appending to ZIP archive blows up existing Central Directory entries
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.8, Python 3.7, Python 2.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: alanmcintyre, serhiy.storchaka, twouters
Priority: normal Keywords: patch

Created on 2018-08-06 07:57 by serhiy.storchaka, last changed 2018-08-06 08:07 by serhiy.storchaka.

Pull Requests
URL Status Linked Edit
PR 8683 open serhiy.storchaka, 2018-08-06 08:07
Messages (1)
msg323181 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-08-06 07:57
When the ZIP archive is opened for appending, it reads the Central Directory at opening and writes existing entries back at closing. The Zip64 Extra Field is appended to existing Extra Fields if necessary. This leads to increasing the size of the Extra Fields data every time when append to the ZIP archive. Since the total size of Extra Fields is limited by 0xffff bytes, this can cause the failure.

The proposed PR removes the Zip64 Extra Field before adding a new Zip64 Extra Field.
Date User Action Args
2018-08-06 08:07:41serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request8178
2018-08-06 07:57:50serhiy.storchakacreate