reject negative data_size
This commit is contained in:
parent
9a3a8e9aa0
commit
5640bbb6c5
|
@ -861,6 +861,10 @@ get_data(char *archive, PyObject *toc_entry)
|
|||
&date, &crc)) {
|
||||
return NULL;
|
||||
}
|
||||
if (data_size < 0) {
|
||||
PyErr_Format(ZipImportError, "negative data size");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
fp = fopen(archive, "rb");
|
||||
if (!fp) {
|
||||
|
|
Loading…
Reference in New Issue