[issue774221] 2.3c1: zipfile.py confused by garbage at the very end of zip

Alan McIntyre report at bugs.python.org
Sun Jan 6 23:28:45 CET 2008


Alan McIntyre added the comment:

Since there's no reply about where ZIP files with appended 'garbage'
might come from, should this be closed?  I agree with amk; it doesn't
seem wise to ignore incorrectly formatted files without a good reason.

On a related note, it seems that correctly formatted ZIP files with
comments longer than 4k will not be recognized as a ZIP file by the
zipfile module.  There's some comment about not looking at more than the
last 4k of the file for "efficiency" reasons, but failing to interpret a
correct file seems to override the efficiency concern of
reading/searching another 60k of data.  I'll open a separate tracker
item for this, since it's not strictly related to the original issue.

----------
nosy: +alanmcintyre

____________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue774221>
____________________________________


More information about the Python-bugs-list mailing list