summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2016-01-22 06:04:04 (GMT)
committerBenjamin Peterson <benjamin@python.org>2016-01-22 06:04:04 (GMT)
commitae8c078dbb93db3af982b7b42382e956af663185 (patch)
tree825f95658a318a8073d78a4dcd3ac7f3cc1e0d4b /Modules
parentcbde4a6924296504447928520ab8fad9bc860b64 (diff)
parentd52513cb222174df834ea81e61037899248e312c (diff)
downloadcpython-ae8c078dbb93db3af982b7b42382e956af663185.zip
cpython-ae8c078dbb93db3af982b7b42382e956af663185.tar.gz
cpython-ae8c078dbb93db3af982b7b42382e956af663185.tar.bz2
merge 3.5
Diffstat (limited to 'Modules')
-rw-r--r--Modules/zipimport.c4
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)