if(SectionOffset != NULL)
{
ProbeForWriteLargeInteger(SectionOffset);
- SafeSectionOffset.QuadPart = PAGE_ROUND_DOWN(SectionOffset->QuadPart);
+ SafeSectionOffset = *SectionOffset;
}
ProbeForWriteSize_t(ViewSize);
SafeViewSize = *ViewSize;
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,