Commit 02246381 authored by Benjamin Peterson's avatar Benjamin Peterson

reject negative data_size

parent 802c8a59
......@@ -1071,6 +1071,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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment