[Python-checkins] cpython (merge 3.5 -> default): merge 3.5

benjamin.peterson python-checkins at python.org
Fri Jan 22 01:04:13 EST 2016


https://hg.python.org/cpython/rev/0f46c9a5735f
changeset:   100037:0f46c9a5735f
parent:      100033:64ab1a8bb208
parent:      100036:5533a9e02b21
user:        Benjamin Peterson <benjamin at python.org>
date:        Thu Jan 21 22:04:04 2016 -0800
summary:
  merge 3.5

files:
  Modules/zipimport.c |  4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Modules/zipimport.c b/Modules/zipimport.c
--- a/Modules/zipimport.c
+++ b/Modules/zipimport.c
@@ -1091,6 +1091,10 @@
                           &date, &crc)) {
         return NULL;
     }
+    if (data_size < 0) {
+        PyErr_Format(ZipImportError, "negative data size");
+        return NULL;
+    }
 
     fp = _Py_fopen_obj(archive, "rb");
     if (!fp)

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list