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 Oren Milman
Recipients Oren Milman
Date 2017-09-27.06:24:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The following code causes an assertion failure (in case there exists a
compressed zip file named '' with a file called '' in it):

import zlib
import zipimport
def bad_decompress(*args):
    return None

zlib.decompress = bad_decompress

This is because get_data() (in Modules/zipimport.c) assumes that
zlib.decompress() returned a bytes object, and returns it.
zipimport_zipimporter_get_source_impl() assumes that get_data() returned a
bytes object, and passes it to PyBytes_AS_STRING(), which asserts it is a bytes
Date User Action Args
2017-09-27 06:24:51Oren Milmansetrecipients: + Oren Milman
2017-09-27 06:24:51Oren Milmansetmessageid: <>
2017-09-27 06:24:51Oren Milmanlinkissue31602 messages
2017-09-27 06:24:51Oren Milmancreate