summaryrefslogtreecommitdiffstats
path: root/Python/Python-ast.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-09-06 18:25:30 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-09-06 18:25:30 (GMT)
commit56f6e76c680f47ad2b11bed9406305a000a1889a (patch)
tree072b1cbb10bcc6a2f1ddf761c5bf49a8b447a560 /Python/Python-ast.c
parent7827a5b7c29ae71daf0175ce3398115374ceb50e (diff)
downloadcpython-56f6e76c680f47ad2b11bed9406305a000a1889a.zip
cpython-56f6e76c680f47ad2b11bed9406305a000a1889a.tar.gz
cpython-56f6e76c680f47ad2b11bed9406305a000a1889a.tar.bz2
Issue #15989: Fixed some scarcely probable integer overflows.
It is very unlikely that they can occur in real code for now.
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r--Python/Python-ast.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index 8a2dc7c..fd7f17e 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;