Alexandre Julliard : ntdll: Make sure we send valid object attributes in NtCreateUserProcess().
Alexandre Julliard
julliard at winehq.org
Thu Mar 4 15:53:36 CST 2021
Module: wine
Branch: master
Commit: d0a1bddea0f618c199e2b7d9930ab06df6c61935
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d0a1bddea0f618c199e2b7d9930ab06df6c61935
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Mar 4 13:04:42 2021 +0100
ntdll: Make sure we send valid object attributes in NtCreateUserProcess().
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/unix/process.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/ntdll/unix/process.c b/dlls/ntdll/unix/process.c
index 083a3a82a1d..ca9951dfa03 100644
--- a/dlls/ntdll/unix/process.c
+++ b/dlls/ntdll/unix/process.c
@@ -861,6 +861,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_
CLIENT_ID id;
HANDLE parent = 0, debug = 0, token = 0;
UNICODE_STRING path = {0};
+ OBJECT_ATTRIBUTES empty_attr = { sizeof(empty_attr) };
SIZE_T i, attr_count = (attr->TotalLength - sizeof(attr->TotalLength)) / sizeof(PS_ATTRIBUTE);
const PS_ATTRIBUTE *handles_attr = NULL;
data_size_t handles_size;
@@ -893,6 +894,7 @@ NTSTATUS WINAPI NtCreateUserProcess( HANDLE *process_handle_ptr, HANDLE *thread_
break;
}
}
+ if (!process_attr) process_attr = &empty_attr;
TRACE( "%s image %s cmdline %s parent %p\n", debugstr_us( &path ),
debugstr_us( ¶ms->ImagePathName ), debugstr_us( ¶ms->CommandLine ), parent );
More information about the wine-cvs
mailing list