mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-21 17:09:06 -07:00
kernel32/tests: Don't hardcode page size in buffer size.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
52838daec5
commit
b5be39cfb8
Notes:
Alexandre Julliard
2024-11-12 22:01:31 +01:00
Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6767
1 changed files with 4 additions and 1 deletions
|
@ -4368,13 +4368,15 @@ static void test_PrefetchVirtualMemory(void)
|
|||
|
||||
static void test_ReadProcessMemory(void)
|
||||
{
|
||||
BYTE buf[0x2000];
|
||||
BYTE *buf;
|
||||
DWORD old_prot;
|
||||
SIZE_T copied;
|
||||
HANDLE hproc;
|
||||
void *ptr;
|
||||
BOOL ret;
|
||||
|
||||
buf = malloc(2 * si.dwPageSize);
|
||||
ok(buf != NULL, "OOM\n");
|
||||
ret = DuplicateHandle(GetCurrentProcess(), GetCurrentProcess(), GetCurrentProcess(),
|
||||
&hproc, 0, FALSE, DUPLICATE_SAME_ACCESS);
|
||||
ok(ret, "DuplicateHandle failed %lu\n", GetLastError());
|
||||
|
@ -4403,6 +4405,7 @@ static void test_ReadProcessMemory(void)
|
|||
ret = VirtualFree(ptr, 0, MEM_RELEASE);
|
||||
ok(ret, "VirtualFree failed %lu\n", GetLastError());
|
||||
CloseHandle(hproc);
|
||||
free(buf);
|
||||
}
|
||||
|
||||
START_TEST(virtual)
|
||||
|
|
Loading…
Reference in a new issue