mirror of
https://github.com/python/cpython
synced 2026-09-29 08:00:32 +03:00
reject negative data_size
This commit is contained in:
parent
5d0124623c
commit
b1db758061
1 changed files with 4 additions and 0 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue