This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Appending to ZIP archive blows up existing Central Directory entries
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.8, Python 3.7, Python 3.6, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: alanmcintyre, miss-islington, serhiy.storchaka, twouters
Priority: normal Keywords: patch

Created on 2018-08-06 07:57 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8683 merged serhiy.storchaka, 2018-08-06 08:07
PR 9356 merged miss-islington, 2018-09-17 12:36
PR 9357 merged miss-islington, 2018-09-17 12:37
PR 9400 merged serhiy.storchaka, 2018-09-18 17:33
Messages (5)
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.
msg325536 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-09-17 12:36
New changeset 9bdb7be482aef8f60daa1d36606568a132dcb616 by Serhiy Storchaka in branch 'master':
bpo-34341: Fix appending to ZIP archives with the ZIP64 extension. (GH-8683)
https://github.com/python/cpython/commit/9bdb7be482aef8f60daa1d36606568a132dcb616
msg325539 - (view) Author: miss-islington (miss-islington) Date: 2018-09-17 13:08
New changeset efdf316d23c2bc81f499c46faaba5e1b49509afa by Miss Islington (bot) in branch '3.7':
bpo-34341: Fix appending to ZIP archives with the ZIP64 extension. (GH-8683)
https://github.com/python/cpython/commit/efdf316d23c2bc81f499c46faaba5e1b49509afa
msg325542 - (view) Author: miss-islington (miss-islington) Date: 2018-09-17 13:11
New changeset 83a0985165abf340294c10d732840e9d46ba218c by Miss Islington (bot) in branch '3.6':
bpo-34341: Fix appending to ZIP archives with the ZIP64 extension. (GH-8683)
https://github.com/python/cpython/commit/83a0985165abf340294c10d732840e9d46ba218c
msg325679 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-09-18 20:28
New changeset 29034baf58156e2462b0680e9092c0a3cccb0798 by Serhiy Storchaka in branch '2.7':
[2.7] bpo-34341: Fix appending to ZIP archives with the ZIP64 extension. (GH-8683). (GH-9400)
https://github.com/python/cpython/commit/29034baf58156e2462b0680e9092c0a3cccb0798
History
Date User Action Args
2022-04-11 14:59:04adminsetgithub: 78522
2018-09-18 20:34:16serhiy.storchakasetstatus: open -> closed
stage: patch review -> resolved
resolution: fixed
versions: + Python 3.6
2018-09-18 20:28:38serhiy.storchakasetmessages: + msg325679
2018-09-18 17:33:01serhiy.storchakasetpull_requests: + pull_request8823
2018-09-17 13:11:46miss-islingtonsetmessages: + msg325542
2018-09-17 13:08:53miss-islingtonsetnosy: + miss-islington
messages: + msg325539
2018-09-17 12:37:04miss-islingtonsetpull_requests: + pull_request8780
2018-09-17 12:36:54miss-islingtonsetpull_requests: + pull_request8779
2018-09-17 12:36:45serhiy.storchakasetmessages: + msg325536
2018-08-06 08:07:41serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request8178
2018-08-06 07:57:50serhiy.storchakacreate