diff --git a/Misc/NEWS.d/next/Windows/2018-03-01-14-00-51.bpo-32818.C_908x.rst b/Misc/NEWS.d/next/Windows/2018-03-01-14-00-51.bpo-32818.C_908x.rst new file mode 100644 index 00000000000000..2277605e4109ef --- /dev/null +++ b/Misc/NEWS.d/next/Windows/2018-03-01-14-00-51.bpo-32818.C_908x.rst @@ -0,0 +1,2 @@ +Fix a subprocess crash in Windows compatibility mode when +``STARTUPINFO.lpAttributeList`` is empty. Patch By Segev Finer. diff --git a/Modules/_winapi.c b/Modules/_winapi.c index 3e24d512cac384..9e34e37d4e1632 100644 --- a/Modules/_winapi.c +++ b/Modules/_winapi.c @@ -1140,7 +1140,8 @@ _winapi_CreateProcess_impl(PyObject *module, NULL, NULL, inherit_handles, - creation_flags | EXTENDED_STARTUPINFO_PRESENT | + creation_flags | + (si.lpAttributeList ? EXTENDED_STARTUPINFO_PRESENT : 0) | CREATE_UNICODE_ENVIRONMENT, wenvironment, current_directory,