Fix NtUserOpenClipboard (#2558) This pull request updates the definition for `NtUserOpenClipboard` to reflect that the syscall writes to a pointer provided in the second argument. `OpenClipboard` passes an address of a local variable to this parameter and then reads from it, causing the following warning: ``` Error #1: UNINITIALIZED READ: reading 0x00000092296ff998-0x00000092296ff99c 4 byte(s) # 0 USER32.dll!OpenClipboard # 1 main Note: @0:00:00.082 in thread 11352 Note: instruction: cmp 0x38(%rsp) $0x00000000 ```
diff --git a/drsyscall/table_windows_ntuser.c b/drsyscall/table_windows_ntuser.c index a13e899..5877193 100644 --- a/drsyscall/table_windows_ntuser.c +++ b/drsyscall/table_windows_ntuser.c
@@ -1341,7 +1341,7 @@ {{0,0},"NtUserOpenClipboard", OK, SYSARG_TYPE_BOOL32, 2, { {0, sizeof(HWND), SYSARG_INLINED, DRSYS_TYPE_HANDLE}, - {1, sizeof(DWORD), SYSARG_INLINED, DRSYS_TYPE_UNSIGNED_INT}, + {1, sizeof(BOOL), W|HT, DRSYS_TYPE_BOOL}, } }, {{0,0},"NtUserOpenDesktop", OK, DRSYS_TYPE_HANDLE, 3,
diff --git a/wininc/ntuser.h b/wininc/ntuser.h index 29b6775..3f2d26f 100644 --- a/wininc/ntuser.h +++ b/wininc/ntuser.h
@@ -2494,7 +2494,7 @@ NTAPI NtUserOpenClipboard( HWND hWnd, - DWORD Unknown1); + PBOOL pfEmptyClient); HDESK NTAPI