Skip to content

Commit 82fb346

Browse files
authored
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 ```
1 parent fbc75a3 commit 82fb346

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drsyscall/table_windows_ntuser.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ syscall_info_t syscall_user32_info[] = {
13411341
{{0,0},"NtUserOpenClipboard", OK, SYSARG_TYPE_BOOL32, 2,
13421342
{
13431343
{0, sizeof(HWND), SYSARG_INLINED, DRSYS_TYPE_HANDLE},
1344-
{1, sizeof(DWORD), SYSARG_INLINED, DRSYS_TYPE_UNSIGNED_INT},
1344+
{1, sizeof(BOOL), W|HT, DRSYS_TYPE_BOOL},
13451345
}
13461346
},
13471347
{{0,0},"NtUserOpenDesktop", OK, DRSYS_TYPE_HANDLE, 3,

wininc/ntuser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2494,7 +2494,7 @@ BOOL
24942494
NTAPI
24952495
NtUserOpenClipboard(
24962496
HWND hWnd,
2497-
DWORD Unknown1);
2497+
PBOOL pfEmptyClient);
24982498

24992499
HDESK
25002500
NTAPI

0 commit comments

Comments
 (0)