mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #15989: Fixed some scarcely probable integer overflows.
It is very unlikely that they can occur in real code for now.
This commit is contained in:
parent
7827a5b7c2
commit
56f6e76c68
7 changed files with 27 additions and 23 deletions
|
@ -769,7 +769,7 @@ static int obj2ast_int(PyObject* obj, int* out, PyArena* arena)
|
|||
return 1;
|
||||
}
|
||||
|
||||
i = (int)PyLong_AsLong(obj);
|
||||
i = _PyLong_AsInt(obj);
|
||||
if (i == -1 && PyErr_Occurred())
|
||||
return 1;
|
||||
*out = i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue