Commit fa940f59 authored by Andreas Mohr's avatar Andreas Mohr Committed by Alexandre Julliard

VirtualQuery should return 0 for all addresses >= 0xc0000000.

parent 147bc6d2
......@@ -1031,6 +1031,7 @@ BOOL WINAPI VirtualProtectEx(
*
* RETURNS
* Number of bytes returned in information buffer
* or 0 if addr is >= 0xc0000000 (kernel space).
*/
DWORD WINAPI VirtualQuery(
LPCVOID addr, /* [in] Address of region */
......@@ -1038,10 +1039,14 @@ DWORD WINAPI VirtualQuery(
DWORD len /* [in] Size of buffer */
) {
FILE_VIEW *view;
UINT base = ROUND_ADDR( addr );
UINT base;
UINT alloc_base = 0;
UINT size = 0;
if (addr >= (void*)0xc0000000) return 0;
base = ROUND_ADDR( addr );
/* Find the view containing the address */
EnterCriticalSection(&csVirtual);
......
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