From 56f6e76c680f47ad2b11bed9406305a000a1889a Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 6 Sep 2015 21:25:30 +0300 Subject: Issue #15989: Fixed some scarcely probable integer overflows. It is very unlikely that they can occur in real code for now. --- Python/Python-ast.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Python/Python-ast.c') diff --git a/Python/Python-ast.c b/Python/Python-ast.c index 8a2dc7cc54..fd7f17e85b 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -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; -- cgit v1.2.1