mirror of
https://github.com/python/cpython.git
synced 2025-09-24 17:33:29 +00:00
Issue #15989: Fix several occurrences of integer overflow
when result of PyInt_AsLong() or PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277.
This commit is contained in:
parent
ac7b49f407
commit
74f49ab28b
17 changed files with 143 additions and 22 deletions
|
@ -40,6 +40,7 @@ PyAPI_FUNC(PyObject *) PyInt_FromSize_t(size_t);
|
|||
PyAPI_FUNC(PyObject *) PyInt_FromSsize_t(Py_ssize_t);
|
||||
PyAPI_FUNC(long) PyInt_AsLong(PyObject *);
|
||||
PyAPI_FUNC(Py_ssize_t) PyInt_AsSsize_t(PyObject *);
|
||||
PyAPI_FUNC(int) _PyInt_AsInt(PyObject *);
|
||||
PyAPI_FUNC(unsigned long) PyInt_AsUnsignedLongMask(PyObject *);
|
||||
#ifdef HAVE_LONG_LONG
|
||||
PyAPI_FUNC(unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue