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 j w
Recipients j w
Date 2016-02-09.10:37:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1455014276.42.0.95606517598.issue26319@psf.upfronthosting.co.za>
In-reply-to
Content
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 "/usr/lib/python2.7/zipfile.py", line 135, in _check_zipfile>
  if _EndRecData(fp):>
File "/usr/lib/python2.7/zipfile.py", line 238, in _EndRecData>
  endrec = list(struct.unpack(structEndArchive, recData))>

Check the size of recData before unpacking.
 ...
 237: recData = data[start:start+sizeEndCentDir]
 238: endrec = list(struct.unpack(structEndArchive, recData))
History
Date User Action Args
2016-02-09 10:37:56j wsetrecipients: + j w
2016-02-09 10:37:56j wsetmessageid: <1455014276.42.0.95606517598.issue26319@psf.upfronthosting.co.za>
2016-02-09 10:37:56j wlinkissue26319 messages
2016-02-09 10:37:56j wcreate