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:
Serhiy Storchaka 2015-09-06 21:25:30 +03:00
parent 7827a5b7c2
commit 56f6e76c68
7 changed files with 27 additions and 23 deletions

View file

@ -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;