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

commit d29e216f994f8aa321c32ec77b9ad507357b37b3
Author:     Maxim Smirnov <[email protected]>
AuthorDate: Sun Mar 31 14:51:06 2019 +0300
Commit:     Pierre Schweitzer <[email protected]>
CommitDate: Sun Mar 31 13:51:06 2019 +0200

    [NTOSKRNL] In MmCreateImageSection, properly check whether cache was 
initialized
    
    This fixes a crash that occurs if nul is typed in cmd.exe
---
 ntoskrnl/mm/section.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c
index 298fc5f0f9..335ab054d8 100644
--- a/ntoskrnl/mm/section.c
+++ b/ntoskrnl/mm/section.c
@@ -3739,7 +3739,7 @@ MmCreateImageSection(PROS_SECTION_OBJECT *SectionObject,
         return STATUS_INVALID_FILE_FOR_SECTION;
 
 #ifndef NEWCC
-    if (FileObject->SectionObjectPointer->SharedCacheMap == NULL)
+    if (!CcIsFileCached(FileObject))
     {
         DPRINT1("Denying section creation due to missing cache 
initialization\n");
         return STATUS_INVALID_FILE_FOR_SECTION;

Reply via email to