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

This commit is contained in:
Andreas Mohr 2000-11-29 00:01:40 +00:00 committed by Alexandre Julliard
parent 147bc6d21b
commit fa940f5989
1 changed files with 6 additions and 1 deletions

View File

@ -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);