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

@ -39,13 +39,14 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
===================================
**Bugfixes and features included in the next upcoming release [8]:**
**Bugfixes and features included in the next upcoming release [9]:**
* Avoid race-conditions of async WSARecv() operations with write watches.
* Black & White needs DXTn software decoding support ([Wine Bug #14939](https://bugs.winehq.org/show_bug.cgi?id=14939))
* Fix handling of empty section and key name for profile files. ([Wine Bug #8036](https://bugs.winehq.org/show_bug.cgi?id=8036))
* Fix issues with dragging layers between images in Adobe Photoshop 7.0 ([Wine Bug #12007](https://bugs.winehq.org/show_bug.cgi?id=12007))
* Fix ordering of IP addresses by metric if two addresses have the same metric.
* Fix passing of unicode environment from msvcrt to CreateProcessW. ([Wine Bug #37635](https://bugs.winehq.org/show_bug.cgi?id=37635))
* Implement exclusive mode in PulseAudio backend ([Wine Bug #37042](https://bugs.winehq.org/show_bug.cgi?id=37042))
* Support for K32EnumProcessModulesEx ([Wine Bug #34864](https://bugs.winehq.org/show_bug.cgi?id=34864))
* Wintrust doesn't reset data->pWintrustData->u.pFile->hFile after closing handle ([Wine Bug #36257](https://bugs.winehq.org/show_bug.cgi?id=36257))

1
debian/changelog vendored
View File

@ -20,6 +20,7 @@ wine-compholio (1.7.32) UNRELEASED; urgency=low
* Added patch to implement semi-stub for psapi/kernel32 K32EnumProcessModulesEx.
* Added patch to fix ordering of IP addresses by metric if two addresses have the same metric.
* Added patch to fix handling of empty section and key name for profile files.
* Added patch to fix passing of unicode environment from msvcrt to CreateProcessW.
* Removed patch to close server fd is there is no space in thread inflight fd list (accepted upstream).
* Removed patch to fix bugs in StrStr functions (accepted upstream).
* Removed patches to avoid sending messages in FindWindowExW (accepted upstream).

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.