[issue1622] zipfile hangs on certain zip files

Alan McIntyre report at bugs.python.org
Wed Jan 9 08:00:09 CET 2008


Alan McIntyre added the comment:

Here's the first draft of a patch (zipfile-unsigned-fixes.diff) that
does a few things:

- Interpret fields as unsigned unless required (CRC, etc.)
- Corrects reading of ZIP files with large archive comments
- Replaces hard-coded structure sizes with module-level variables
(calculated using struct.calcsize)
- When writing a file in ZipFile.close(), if the ZipFile instance has a
comment value, this value is now written as the archive comment
- Renamed some of the module variables to better match the names used in
the ZIP file spec
- General cleanup & addition of comments to (hopefully) make the code a
little easier to follow

Test & doc changes are included, & this code currently passes regression
test suite with -uall on OS X.

Added file: http://bugs.python.org/file9113/zipfile-unsigned-fixes.diff

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1622>
__________________________________


More information about the Python-bugs-list mailing list