From f4f6d1b7e223856628d228bb8b4b8605e6144f9e Mon Sep 17 00:00:00 2001 From: Dmitry Gorbachev Date: Sat, 17 Mar 2007 08:30:26 +0000 Subject: [PATCH] Fix my bad fix. svn path=/trunk/; revision=26119 --- reactos/ntoskrnl/mm/section.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 082f99451c7..6177c7ec13f 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -3716,7 +3716,7 @@ NtMapViewOfSection(IN HANDLE SectionHandle, if(SectionOffset != NULL) { ProbeForWriteLargeInteger(SectionOffset); - SafeSectionOffset.QuadPart = PAGE_ROUND_DOWN(SectionOffset->QuadPart); + SafeSectionOffset = *SectionOffset; } ProbeForWriteSize_t(ViewSize); SafeViewSize = *ViewSize; @@ -3735,11 +3735,12 @@ NtMapViewOfSection(IN HANDLE SectionHandle, else { SafeBaseAddress = (BaseAddress != NULL ? *BaseAddress : NULL); - SafeSectionOffset.QuadPart = - (SectionOffset != NULL ? PAGE_ROUND_DOWN(SectionOffset->QuadPart) : 0); + SafeSectionOffset.QuadPart = (SectionOffset != NULL ? SectionOffset->QuadPart : 0); SafeViewSize = (ViewSize != NULL ? *ViewSize : 0); } + SafeSectionOffset.LowPart = PAGE_ROUND_DOWN(SafeSectionOffset.LowPart); + Status = ObReferenceObjectByHandle(ProcessHandle, PROCESS_VM_OPERATION, PsProcessType,