mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Issue #15989: Fix several occurrences of integer overflow
when result of PyLong_AsLong() narrowed to int without checks. This is a backport of changesets 13e2e44db99d and 525407d89277.
This commit is contained in:
commit
9101e23ff6
19 changed files with 151 additions and 25 deletions
|
|
@ -8174,7 +8174,7 @@ posix_pipe2(PyObject *self, PyObject *arg)
|
|||
int fds[2];
|
||||
int res;
|
||||
|
||||
flags = PyLong_AsLong(arg);
|
||||
flags = _PyLong_AsInt(arg);
|
||||
if (flags == -1 && PyErr_Occurred())
|
||||
return NULL;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue