Terry J. Reedy added the comment:
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.
New submission from j w:
Encountered on version: 2.7.3
Exception message: "error: unpack requires a string argument of length 22"
Stack trace:
...
elif zipfile.is_zipfile(_file):>
File "/usr/lib/python2.7/zipfile.py", line 152, in is_zipfile>
result = _check_zipfile(fp)>
File