diff options
author | Stefan Krah <skrah@bytereef.org> | 2012-08-20 12:36:47 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2012-08-20 12:36:47 (GMT) |
commit | db579d7b25a483601ae9d8eec2846b4839cd97aa (patch) | |
tree | 1a61dd348bbadce2aaccf17783e9c61d8663b397 /Modules/_posixsubprocess.c | |
parent | fd24f9e51e80fb050e4239f6909eaff2d29ec30d (diff) | |
download | cpython-db579d7b25a483601ae9d8eec2846b4839cd97aa.zip cpython-db579d7b25a483601ae9d8eec2846b4839cd97aa.tar.gz cpython-db579d7b25a483601ae9d8eec2846b4839cd97aa.tar.bz2 |
Issue #15738: Fix a missing NULL check in subprocess_fork_exec().
Diffstat (limited to 'Modules/_posixsubprocess.c')
-rw-r--r-- | Modules/_posixsubprocess.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_posixsubprocess.c b/Modules/_posixsubprocess.c index 44e1613..c93f537 100644 --- a/Modules/_posixsubprocess.c +++ b/Modules/_posixsubprocess.c @@ -577,6 +577,8 @@ subprocess_fork_exec(PyObject* self, PyObject *args) /* Equivalent to: */ /* tuple(PyUnicode_FSConverter(arg) for arg in process_args) */ fast_args = PySequence_Fast(process_args, "argv must be a tuple"); + if (fast_args == NULL) + goto cleanup; num_args = PySequence_Fast_GET_SIZE(fast_args); converted_args = PyTuple_New(num_args); if (converted_args == NULL) |