Fix bugs #2049 and #2084 (thanks to Peter Krawies)

svn path=/trunk/; revision=26117
This commit is contained in:
Dmitry Gorbachev 2007-03-16 16:54:34 +00:00
parent 6f562dec4a
commit 93a03949bf
2 changed files with 4 additions and 3 deletions

View file

@ -29,7 +29,7 @@ typedef struct
extern PVOID VideoOffScreenBuffer;
USHORT BiosIsVesaSupported(VOID); // Implemented in i386vid.S, returns the VESA version
USHORT BiosIsVesaSupported(VOID); // Implemented in i386vid.c, returns the VESA version
PVOID VideoAllocateOffScreenBuffer(VOID); // Returns a pointer to an off-screen buffer sufficient for the current video mode

View file

@ -3716,7 +3716,7 @@ NtMapViewOfSection(IN HANDLE SectionHandle,
if(SectionOffset != NULL)
{
ProbeForWriteLargeInteger(SectionOffset);
SafeSectionOffset = *SectionOffset;
SafeSectionOffset.QuadPart = PAGE_ROUND_DOWN(SectionOffset->QuadPart);
}
ProbeForWriteSize_t(ViewSize);
SafeViewSize = *ViewSize;
@ -3735,7 +3735,8 @@ NtMapViewOfSection(IN HANDLE SectionHandle,
else
{
SafeBaseAddress = (BaseAddress != NULL ? *BaseAddress : NULL);
SafeSectionOffset.QuadPart = (SectionOffset != NULL ? SectionOffset->QuadPart : 0);
SafeSectionOffset.QuadPart =
(SectionOffset != NULL ? PAGE_ROUND_DOWN(SectionOffset->QuadPart) : 0);
SafeViewSize = (ViewSize != NULL ? *ViewSize : 0);
}