Alexandre Julliard : kernel32: Avoid setting an empty current directory in the process params.

Alexandre Julliard julliard at winehq.org
Wed Oct 24 15:13:54 CDT 2018


Module: wine
Branch: master
Commit: 7a8ff7fab34e765956fbaf29b63226e561cc0045
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=7a8ff7fab34e765956fbaf29b63226e561cc0045

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Oct 24 12:21:06 2018 +0200

kernel32: Avoid setting an empty current directory in the process params.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/process.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c
index ea483b9..1490f6d 100644
--- a/dlls/kernel32/process.c
+++ b/dlls/kernel32/process.c
@@ -1887,8 +1887,9 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( LPCWSTR filename, LPC
     RtlInitUnicodeString( &desktopW, startup->lpDesktop );
     runtimeW.Buffer = (WCHAR *)startup->lpReserved2;
     runtimeW.Length = runtimeW.MaximumLength = startup->cbReserved2;
-    if (RtlCreateProcessParametersEx( &params, &imageW, NULL, &curdirW, &cmdlineW, envW, &titleW,
-                                      &desktopW, NULL, &runtimeW, PROCESS_PARAMS_FLAG_NORMALIZED ))
+    if (RtlCreateProcessParametersEx( &params, &imageW, NULL, cur_dir ? &curdirW : NULL,
+                                      &cmdlineW, envW, &titleW, &desktopW,
+                                      NULL, &runtimeW, PROCESS_PARAMS_FLAG_NORMALIZED ))
     {
         if (envW != env) HeapFree( GetProcessHeap(), 0, envW );
         return NULL;




More information about the wine-cvs mailing list