https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d3a29816cee614fcd4266063da5a0001d2abf8da

commit d3a29816cee614fcd4266063da5a0001d2abf8da
Author:     Thomas Faber <[email protected]>
AuthorDate: Fri Jan 26 13:56:06 2018 +0100
Commit:     Thomas Faber <[email protected]>
CommitDate: Sun Jan 28 10:48:27 2018 +0100

    [NTOS:MM] Assert MmLocateMemoryAreaByAddress return value to satisfy 
Coverity. CID 701289
---
 ntoskrnl/mm/ARM3/virtual.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ntoskrnl/mm/ARM3/virtual.c b/ntoskrnl/mm/ARM3/virtual.c
index 97f017f326..f0ab5d08f7 100644
--- a/ntoskrnl/mm/ARM3/virtual.c
+++ b/ntoskrnl/mm/ARM3/virtual.c
@@ -4742,7 +4742,7 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
         goto FailPath;
     }
 
-       if ((AllocationType & MEM_RESET) == MEM_RESET)
+    if ((AllocationType & MEM_RESET) == MEM_RESET)
     {
         /// @todo HACK: pretend success
         DPRINT("MEM_RESET not supported\n");
@@ -4778,6 +4778,7 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle,
     // Make sure this is an ARM3 section
     //
     MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, 
(PVOID)PAGE_ROUND_DOWN(PBaseAddress));
+    ASSERT(MemoryArea != NULL);
     if (MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3)
     {
         DPRINT1("Illegal commit of non-ARM3 section!\n");

Reply via email to