summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-14 23:12:17 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-14 23:12:17 (GMT)
commit78980438683d98076cd541d995a868fb5c9e4277 (patch)
tree6003323bfe4c38f0d9ca17f126fbcdf782752600 /Include
parent5f1cfbb5c056564e2692d2abcdc82f1944a3b2ec (diff)
downloadcpython-78980438683d98076cd541d995a868fb5c9e4277.zip
cpython-78980438683d98076cd541d995a868fb5c9e4277.tar.gz
cpython-78980438683d98076cd541d995a868fb5c9e4277.tar.bz2
Issue #15989: Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.
Diffstat (limited to 'Include')
-rw-r--r--Include/longobject.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/longobject.h b/Include/longobject.h
index d741f1b..cd0cf30 100644
--- a/Include/longobject.h
+++ b/Include/longobject.h
@@ -26,6 +26,9 @@ PyAPI_FUNC(Py_ssize_t) PyLong_AsSsize_t(PyObject *);
PyAPI_FUNC(size_t) PyLong_AsSize_t(PyObject *);
PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLong(PyObject *);
PyAPI_FUNC(unsigned long) PyLong_AsUnsignedLongMask(PyObject *);
+#ifndef Py_LIMITED_API
+PyAPI_FUNC(int) _PyLong_AsInt(PyObject *);
+#endif
PyAPI_FUNC(PyObject *) PyLong_GetInfo(void);
/* It may be useful in the future. I've added it in the PyInt -> PyLong