[PATCH 0/1] MR3647: msvcrt/tests: Make registry handle inheritable in test_invalid_stdin tests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55286 On Windows values passed in STARTUPINFO.hStdInput are preserved even if passed value is invalid. Because of that, newly created process was using garbage as standard input handle. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/3647
From: Piotr Caban <piotr(a)codeweavers.com> Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55286 --- dlls/msvcrt/tests/file.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/msvcrt/tests/file.c b/dlls/msvcrt/tests/file.c index 15f18a395c8..71b3e1399f8 100644 --- a/dlls/msvcrt/tests/file.c +++ b/dlls/msvcrt/tests/file.c @@ -1929,6 +1929,10 @@ static void test_invalid_stdin( const char* selfname ) ret = RegOpenCurrentUser(KEY_READ, &key); ok(!ret, "RegOpenCurrentUser failed: %lx\n", ret); + ret = DuplicateHandle(GetCurrentProcess(), key, GetCurrentProcess(), + (HANDLE *)&key, GENERIC_READ, TRUE, DUPLICATE_CLOSE_SOURCE); + ok(ret, "DuplicateHandle failed: %lx\n", GetLastError()); + sa.nLength = sizeof(sa); sa.lpSecurityDescriptor = NULL; sa.bInheritHandle = TRUE; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/3647
participants (2)
-
Piotr Caban -
Piotr Caban (@piotr)