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

commit c3bd70cfd15772877629fd53df547402cde572f6
Author:     Jérôme Gardou <jerome.gar...@reactos.org>
AuthorDate: Mon Oct 26 12:19:18 2020 +0100
Commit:     Jérôme Gardou <jerome.gar...@reactos.org>
CommitDate: Wed Feb 3 09:41:21 2021 +0100

    [NTOSKRNL/MM] Fix a few wine tests
---
 ntoskrnl/mm/section.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c
index 5dd758f865d..f65c5c1ff64 100644
--- a/ntoskrnl/mm/section.c
+++ b/ntoskrnl/mm/section.c
@@ -4302,13 +4302,22 @@ NtQuerySection(
 
             if (Section->u.Flags.Image)
             {
-                Sbi.BaseAddress = 0;
-                Sbi.Size.QuadPart = 0;
+                if (MiIsRosSectionObject(Section))
+                {
+                    PMM_IMAGE_SECTION_OBJECT ImageSectionObject = 
((PMM_IMAGE_SECTION_OBJECT)Section->Segment);
+                    Sbi.BaseAddress = 0;
+                    Sbi.Size.QuadPart = 
ImageSectionObject->ImageInformation.ImageFileSize;
+                }
+                else
+                {
+                    /* Not supported yet */
+                    ASSERT(FALSE);
+                }
             }
             else if (MiIsRosSectionObject(Section))
             {
                 Sbi.BaseAddress = 
(PVOID)((PMM_SECTION_SEGMENT)Section->Segment)->Image.VirtualAddress;
-                Sbi.Size.QuadPart = 
((PMM_SECTION_SEGMENT)Section->Segment)->Length.QuadPart;
+                Sbi.Size.QuadPart = 
((PMM_SECTION_SEGMENT)Section->Segment)->RawLength.QuadPart;
             }
             else
             {

Reply via email to