ntdll: Fix error code when querying too large memory address.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1cee60d068
commit
556ba38dd1
|
@ -1868,6 +1868,10 @@ static void test_queryvirtualmemory(void)
|
|||
"mbi.Protect is 0x%x\n", mbi.Protect);
|
||||
}
|
||||
else skip( "bss is outside of module\n" ); /* this can happen on Mac OS */
|
||||
|
||||
/* check error code when addr is higher than working set limit */
|
||||
status = pNtQueryVirtualMemory(NtCurrentProcess(), (void *)~0, MemoryBasicInformation, &mbi, sizeof(mbi), &readcount);
|
||||
ok(status == STATUS_INVALID_PARAMETER, "Expected STATUS_INVALID_PARAMETER, got %08x\n", status);
|
||||
}
|
||||
|
||||
static void test_affinity(void)
|
||||
|
|
|
@ -2845,7 +2845,7 @@ NTSTATUS WINAPI NtQueryVirtualMemory( HANDLE process, LPCVOID addr,
|
|||
|
||||
base = ROUND_ADDR( addr, page_mask );
|
||||
|
||||
if (is_beyond_limit( base, 1, working_set_limit )) return STATUS_WORKING_SET_LIMIT_RANGE;
|
||||
if (is_beyond_limit( base, 1, working_set_limit )) return STATUS_INVALID_PARAMETER;
|
||||
|
||||
/* Find the view containing the address */
|
||||
|
||||
|
|
Loading…
Reference in New Issue