[New-bugs-announce] [issue34341] Appending to ZIP archive blows up existing Central Directory entries

Serhiy Storchaka report at bugs.python.org
Mon Aug 6 03:57:50 EDT 2018


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

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.

----------
assignee: serhiy.storchaka
components: Library (Lib)
messages: 323181
nosy: alanmcintyre, serhiy.storchaka, twouters
priority: normal
severity: normal
status: open
title: Appending to ZIP archive blows up existing Central Directory entries
type: behavior
versions: Python 2.7, Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34341>
_______________________________________


More information about the New-bugs-announce mailing list