Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ae8c078

Browse files
committed
merge 3.5
2 parents cbde4a6 + d52513c commit ae8c078

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Modules/zipimport.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1091,6 +1091,10 @@ get_data(PyObject *archive, PyObject *toc_entry)
10911091
&date, &crc)) {
10921092
return NULL;
10931093
}
1094+
if (data_size < 0) {
1095+
PyErr_Format(ZipImportError, "negative data size");
1096+
return NULL;
1097+
}
10941098

10951099
fp = _Py_fopen_obj(archive, "rb");
10961100
if (!fp)

0 commit comments

Comments
 (0)