Added patch to fix passing of unicode environment from msvcrt to CreateProcessW.

This commit is contained in:
Sebastian Lackner
2014-11-30 03:11:04 +01:00
parent 90bd4d997c
commit 2e2178f595
5 changed files with 52 additions and 1 deletions

View File

@@ -55,6 +55,7 @@ PATCHLIST := \
libs-Unicode_Collation.ok \
libwine-BSD_mmap_fixed.ok \
msvcp90-basic_string_wchar_dtor.ok \
msvcrt-Spawn_Process.ok \
msvcrt-atof_strtod.ok \
ntdll-DOS_Attributes.ok \
ntdll-Dynamic_DST.ok \
@@ -799,6 +800,21 @@ msvcp90-basic_string_wchar_dtor.ok:
echo '+ { "Michael Müller", "msvcp90/tests: Add tests to check that basic_string_wchar_dtor returns NULL.", 1 },'; \
) > msvcp90-basic_string_wchar_dtor.ok
# Patchset msvcrt-Spawn_Process
# |
# | This patchset fixes the following Wine bugs:
# | * [#37635] Fix passing of unicode environment from msvcrt to CreateProcessW.
# |
# | Modified files:
# | * dlls/msvcrt/process.c
# |
.INTERMEDIATE: msvcrt-Spawn_Process.ok
msvcrt-Spawn_Process.ok:
$(call APPLY_FILE,msvcrt-Spawn_Process/0001-msvcrt-Fix-passing-of-explicit-environment-to-spawn-.patch)
@( \
echo '+ { "Ron Yorston", "msvcrt: Fix passing of explicit environment to spawn/exec calls.", 1 },'; \
) > msvcrt-Spawn_Process.ok
# Patchset msvcrt-atof_strtod
# |
# | This patchset fixes the following Wine bugs:

View File

@@ -0,0 +1,32 @@
From 0e2b29c185f7ce92ac81cbc94d9da9604e5fbc08 Mon Sep 17 00:00:00 2001
From: Ron Yorston <rmy@tigress.co.uk>
Date: Wed, 26 Nov 2014 17:29:08 +0000
Subject: msvcrt: Fix passing of explicit environment to spawn/exec calls
Explicit sets of environment variables passed to spawn/exec are
consistently converted to wide character environment blocks. Because
CREATE_UNICODE_ENVIRONMENT isn't included in the process creation flags
the environment block is incorrectly passed through another conversion
to wide characters in create_process_impl.
---
dlls/msvcrt/process.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/process.c b/dlls/msvcrt/process.c
index b782727..549c64a 100644
--- a/dlls/msvcrt/process.c
+++ b/dlls/msvcrt/process.c
@@ -149,8 +149,8 @@ static MSVCRT_intptr_t msvcrt_spawn(int flags, const MSVCRT_wchar_t* exe, MSVCRT
si.cb = sizeof(si);
msvcrt_create_io_inherit_block(&si.cbReserved2, &si.lpReserved2);
if (!CreateProcessW(fullname, cmdline, NULL, NULL, TRUE,
- flags == MSVCRT__P_DETACH ? DETACHED_PROCESS : 0,
- env, NULL, &si, &pi))
+ (flags == MSVCRT__P_DETACH ? DETACHED_PROCESS : 0) |
+ CREATE_UNICODE_ENVIRONMENT, env, NULL, &si, &pi))
{
msvcrt_set_errno(GetLastError());
MSVCRT_free(si.lpReserved2);
--
2.1.3

View File

@@ -0,0 +1 @@
Fixes: [37635] Fix passing of unicode environment from msvcrt to CreateProcessW.