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.

Author terry.reedy
Recipients j w, terry.reedy
Date 2016-02-12.20:35:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455309348.21.0.538392777503.issue26319@psf.upfronthosting.co.za>
In-reply-to
Content
The bug was not noticing the length mismatch caused by a corrupt zip file.  It is already fixed.  The last link in your message opens https://hg.python.org/cpython/file/2.7/Lib/zipfile.py#l238.  A few lines further, the code now has an added guard.

        recData = data[start:start+sizeEndCentDir]
        if len(recData) != sizeEndCentDir:
            # Zip file is corrupted.
            return None
        endrec = list(struct.unpack(structEndArchive, recData))

When reporting a bug, please test on the currect release (ie, 2.7.11).  If this is not possible, and you have the specific traceback as here, one could look at the current code online.  Go to hg.python.org/cpython, select version in the sidebar, select 'Browse' in the sidebar, and then, in this case, /Lib and zipfile.py.
History
Date User Action Args
2016-02-12 20:35:48terry.reedysetrecipients: + terry.reedy, j w
2016-02-12 20:35:48terry.reedysetmessageid: <1455309348.21.0.538392777503.issue26319@psf.upfronthosting.co.za>
2016-02-12 20:35:48terry.reedylinkissue26319 messages
2016-02-12 20:35:47terry.reedycreate