Commit 3d86e484 authored by Stéphane Wirtel's avatar Stéphane Wirtel Committed by Gregory P. Smith

bpo-32681: Fix an uninitialized variable in the C implementation of os.dup2 (GH-5346)

See https://bugs.python.org/issue32441 for where this was introduced.
parent ce237c7d
Fix uninitialized variable 'res' in the C implementation of os.dup2. Patch
by Stéphane Wirtel
......@@ -8012,7 +8012,7 @@ static int
os_dup2_impl(PyObject *module, int fd, int fd2, int inheritable)
/*[clinic end generated code: output=bc059d34a73404d1 input=c3cddda8922b038d]*/
{
int res;
int res = 0;
#if defined(HAVE_DUP3) && \
!(defined(HAVE_FCNTL_H) && defined(F_DUP2FD_CLOEXEC))
/* dup3() is available on Linux 2.6.27+ and glibc 2.9 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment