[NTOS/MM] Properly zero-initialize the section object on its creation.
authorJérôme Gardou <zefklop@users.noreply.github.com>
Thu, 15 Nov 2018 14:53:47 +0000 (15:53 +0100)
committerJérôme Gardou <jerome.gardou@reactos.org>
Tue, 1 Jan 2019 21:08:14 +0000 (22:08 +0100)
ntoskrnl/mm/ARM3/section.c

index dceb34a..8a8850e 100644 (file)
@@ -2435,6 +2435,9 @@ MmCreateArm3Section(OUT PVOID *SectionObject,
              (SectionPageProtection & PAGE_GUARD) ||
              (SectionPageProtection & PAGE_NOACCESS)));
 
+    /* Start from scratch */
+    RtlZeroMemory(&Section, sizeof(Section));
+
     /* Convert section flag to page flag */
     if (AllocationAttributes & SEC_NOCACHE) SectionPageProtection |= PAGE_NOCACHE;