diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-01-22 06:03:55 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-01-22 06:03:55 (GMT) |
commit | d52513cb222174df834ea81e61037899248e312c (patch) | |
tree | 69e17e0610bb37792f7d6522dd848355f58b9d7e /Modules | |
parent | e5c05cc8c0c4bdf9748f8d7d2a39e85793e52af9 (diff) | |
parent | b1db7580611421309ab0be7c0801f4f89ecec440 (diff) | |
download | cpython-d52513cb222174df834ea81e61037899248e312c.zip cpython-d52513cb222174df834ea81e61037899248e312c.tar.gz cpython-d52513cb222174df834ea81e61037899248e312c.tar.bz2 |
merge 3.4
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/zipimport.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/zipimport.c b/Modules/zipimport.c index fa60aa9..48a0f26 100644 --- a/Modules/zipimport.c +++ b/Modules/zipimport.c @@ -1091,6 +1091,10 @@ get_data(PyObject *archive, PyObject *toc_entry) &date, &crc)) { return NULL; } + if (data_size < 0) { + PyErr_Format(ZipImportError, "negative data size"); + return NULL; + } fp = _Py_fopen_obj(archive, "rb"); if (!fp) |