[issue36988] zipfile: string IndexError on extract

JUN-WEI SONG report at bugs.python.org
Tue May 21 09:29:19 EDT 2019


JUN-WEI SONG <sungboss2004 at gmail.com> added the comment:

The following output throws error when using unzip -t 

$ unzip -t file0.zip

Output:

Archive:  file0.zip
:  mismatching "local" filename (zipfile_extract.pyUT^I),
         continuing with "central" filename version
    testing:                         
  error:  invalid compressed data to inflate
At least one error was detected in file0.zip.

It looks like the zip file is corrupted. Maybe we could add some detection mechanisms before extract it like unzip, for example, unsupported characters or file corrupted check.

----------
nosy: +krnick

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36988>
_______________________________________


More information about the Python-bugs-list mailing list