summaryrefslogtreecommitdiffstats
path: root/Modules/readline.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 /Modules/readline.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 'Modules/readline.c')
-rw-r--r--Modules/readline.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/readline.c b/Modules/readline.c
index f6b52a0..09877f2 100644
--- a/Modules/readline.c
+++ b/Modules/readline.c
@@ -840,7 +840,7 @@ on_hook(PyObject *func)
if (r == Py_None)
result = 0;
else {
- result = PyLong_AsLong(r);
+ result = _PyLong_AsInt(r);
if (result == -1 && PyErr_Occurred())
goto error;
}