diff options
author | Benjamin Peterson <benjamin@python.org> | 2016-01-22 06:04:04 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2016-01-22 06:04:04 (GMT) |
commit | ae8c078dbb93db3af982b7b42382e956af663185 (patch) | |
tree | 825f95658a318a8073d78a4dcd3ac7f3cc1e0d4b | |
parent | cbde4a6924296504447928520ab8fad9bc860b64 (diff) | |
parent | d52513cb222174df834ea81e61037899248e312c (diff) | |
download | cpython-ae8c078dbb93db3af982b7b42382e956af663185.zip cpython-ae8c078dbb93db3af982b7b42382e956af663185.tar.gz cpython-ae8c078dbb93db3af982b7b42382e956af663185.tar.bz2 |
merge 3.5
-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 78cf398..82e640b 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) |