Issue #15989: Fix several occurrences of integer overflow

when result of PyLong_AsLong() narrowed to int without checks.
This commit is contained in:
Serhiy Storchaka 2013-01-15 01:12:17 +02:00
parent 5f1cfbb5c0
commit 7898043868
19 changed files with 148 additions and 24 deletions

View file

@ -7647,7 +7647,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;