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 jvoisin
Recipients jvoisin
Date 2019-12-10.16:47:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1575996427.98.0.820358175016.issue39018@roundup.psfhosted.org>
In-reply-to
Content
The attached file raises an `IndexError: tuple index out of range` exception when trying to open it with `zipfile.Zipfile('crash-23b7d72644702df94bfcfaab4c25b01ff31c0b38')`, with the following stacktrace:

```
$ cat test_zip.py
import zipfile
import sys

with zipfile.ZipFile(sys.argv[1]) as f:
  pass
$ python3 ./test_zip.py ./crash-23b7d72644702df94bfcfaab4c25b01ff31c0b38
Traceback (most recent call last):
  File "./test_zip.py", line 4, in <module>
    with zipfile.ZipFile(sys.argv[1]) as f:
  File "/usr/lib/python3.7/zipfile.py", line 1225, in __init__
    self._RealGetContents()
  File "/usr/lib/python3.7/zipfile.py", line 1348, in _RealGetContents
    x._decodeExtra()
  File "/usr/lib/python3.7/zipfile.py", line 480, in _decodeExtra
    self.file_size = counts[idx]
IndexError: tuple index out of range
$

```

The zipfile documentation doesn't mention that IndexError is a possible exception for this method.
History
Date User Action Args
2019-12-10 16:47:08jvoisinsetrecipients: + jvoisin
2019-12-10 16:47:07jvoisinsetmessageid: <1575996427.98.0.820358175016.issue39018@roundup.psfhosted.org>
2019-12-10 16:47:07jvoisinlinkissue39018 messages
2019-12-10 16:47:07jvoisincreate