Thomas Waldmann added the comment: patch for py2.7
The EOCD structure is at EOF. It either does not contain a comment (this is what the existing code checks first) or it contains a comment of the length that is specified in the structure. The patch checks consistency specified length vs. real length (end of fixed part of structure up to EOF). If this does not match, it is likely not a zip file, but just a file that happens to have the magic 4 bytes somewhere in its last 64kB. ---------- keywords: +patch Added file: http://bugs.python.org/file45164/isz_fail_fix.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28494> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com