Commit 556ba38d authored by Michael Müller's avatar Michael Müller Committed by Alexandre Julliard

ntdll: Fix error code when querying too large memory address.

parent 1cee60d0
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment