mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Security patches from Apple: prevent int overflow when allocating memory
This commit is contained in:
parent
e70f8e1205
commit
e7d8be80ba
13 changed files with 258 additions and 29 deletions
|
@ -70,6 +70,8 @@ _PyLong_New(Py_ssize_t size)
|
|||
return NULL;
|
||||
}
|
||||
/* coverity[ampersand_in_size] */
|
||||
/* XXX(nnorwitz): This can overflow --
|
||||
PyObject_NEW_VAR / _PyObject_VAR_SIZE need to detect overflow */
|
||||
return PyObject_NEW_VAR(PyLongObject, &PyLong_Type, size);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue