[NTOS/MM] Do not zero out the tail of the segment if the mapping is not an image

This commit is contained in:
Jérôme Gardou 2020-12-04 09:10:13 +01:00
parent 7d70af61e8
commit f114209782

View file

@ -1205,7 +1205,7 @@ MiReadPage(PMEMORY_AREA MemoryArea,
Status = STATUS_SUCCESS; Status = STATUS_SUCCESS;
} }
if ((SegOffset + PAGE_SIZE) > MemoryArea->SectionData.Segment->RawLength.QuadPart) if ((MemoryArea->VadNode.u.VadFlags.VadType == VadImageMap) && ((SegOffset + PAGE_SIZE) > MemoryArea->SectionData.Segment->RawLength.QuadPart))
{ {
KIRQL OldIrql; KIRQL OldIrql;
PUCHAR PageMap; PUCHAR PageMap;