[NTOSKRNL] In MmCreateImageSection, properly check whether cache was initialized

This fixes a crash that occurs if nul is typed in cmd.exe
This commit is contained in:
Maxim Smirnov 2019-03-31 14:51:06 +03:00 committed by Pierre Schweitzer
parent 8bc9935fcb
commit d29e216f99

View File

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