summaryrefslogtreecommitdiff
path: root/Include/longobject.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-15 01:12:17 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-15 01:12:17 +0200
commit78980438683d98076cd541d995a868fb5c9e4277 (patch)
tree6003323bfe4c38f0d9ca17f126fbcdf782752600 /Include/longobject.h
parent5f1cfbb5c056564e2692d2abcdc82f1944a3b2ec (diff)
downloadcpython-git-78980438683d98076cd541d995a868fb5c9e4277.tar.gz
Issue #15989: Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks.
Diffstat (limited to 'Include/longobject.h')
-rw-r--r--Include/longobject.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/longobject.h b/Include/longobject.h
index d741f1b4c0..cd0cf30814 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