[NTOS]
authorAleksey Bragin <aleksey@reactos.org>
Wed, 22 Dec 2010 22:18:32 +0000 (22:18 +0000)
committerAleksey Bragin <aleksey@reactos.org>
Wed, 22 Dec 2010 22:18:32 +0000 (22:18 +0000)
- Fix a typo in region size calculation of special memory areas, which unbreaks OllyDbg & co. Thanks Michael Martin for the hint.
See issue #5692 for more details.

svn path=/trunk/; revision=50109

reactos/ntoskrnl/mm/ARM3/virtual.c

index b576119..2feff79 100644 (file)
@@ -2379,7 +2379,7 @@ MiQueryMemoryBasicInformation(IN HANDLE ProcessHandle,
             MemoryInfo.AllocationBase = (PCHAR)MM_HIGHEST_VAD_ADDRESS + 1;
             MemoryInfo.State = MEM_RESERVE;
             MemoryInfo.Protect = PAGE_NOACCESS;
             MemoryInfo.AllocationBase = (PCHAR)MM_HIGHEST_VAD_ADDRESS + 1;
             MemoryInfo.State = MEM_RESERVE;
             MemoryInfo.Protect = PAGE_NOACCESS;
-            MemoryInfo.RegionSize = (ULONG_PTR)MemoryInfo.AllocationBase - (ULONG_PTR)Address;
+            MemoryInfo.RegionSize = (ULONG_PTR)MM_HIGHEST_USER_ADDRESS + 1 - (ULONG_PTR)Address;
         }
 
         /* Return the data, NtQueryInformation already probed it*/
         }
 
         /* Return the data, NtQueryInformation already probed it*/