mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-24 01:13:04 -05:00
sys: IRP_MJ_READ, FspSafeMdlCreate, FspSafeMdlCopyBack: bug fixes
This commit is contained in:
parent
6efb5cc113
commit
79119a22cb
@ -297,7 +297,8 @@ NTSTATUS FspFsvolReadComplete(
|
|||||||
ULONG InfoChangeNumber;
|
ULONG InfoChangeNumber;
|
||||||
BOOLEAN Success;
|
BOOLEAN Success;
|
||||||
|
|
||||||
FspSafeMdlCopyBack(SafeMdl);
|
if (0 != SafeMdl)
|
||||||
|
FspSafeMdlCopyBack(SafeMdl);
|
||||||
|
|
||||||
if (!PagingIo)
|
if (!PagingIo)
|
||||||
{
|
{
|
||||||
|
@ -592,7 +592,7 @@ NTSTATUS FspSafeMdlCreate(PMDL UserMdl, LOCK_OPERATION Operation, FSP_SAFE_MDL *
|
|||||||
if (Buffer1)
|
if (Buffer1)
|
||||||
{
|
{
|
||||||
RtlCopyMemory((PUINT8)SafeMdl->Buffer + (BufferPageCount - 1) * PAGE_SIZE,
|
RtlCopyMemory((PUINT8)SafeMdl->Buffer + (BufferPageCount - 1) * PAGE_SIZE,
|
||||||
(PUINT8)VirtualAddress + (PageCount - 1) * PAGE_SIZE, ByteOffsetEnd1);
|
PAGE_ALIGN((PUINT8)VirtualAddress + (PageCount - 1) * PAGE_SIZE), ByteOffsetEnd1);
|
||||||
RtlZeroMemory((PUINT8)SafeMdl->Buffer + (BufferPageCount - 1) * PAGE_SIZE + ByteOffsetEnd1,
|
RtlZeroMemory((PUINT8)SafeMdl->Buffer + (BufferPageCount - 1) * PAGE_SIZE + ByteOffsetEnd1,
|
||||||
PAGE_SIZE - ByteOffsetEnd1);
|
PAGE_SIZE - ByteOffsetEnd1);
|
||||||
SafePfnArray[PageCount - 1] = TempPfnArray[BufferPageCount - 1];
|
SafePfnArray[PageCount - 1] = TempPfnArray[BufferPageCount - 1];
|
||||||
@ -680,7 +680,7 @@ VOID FspSafeMdlCopyBack(FSP_SAFE_MDL *SafeMdl)
|
|||||||
RtlCopyMemory((PUINT8)VirtualAddress,
|
RtlCopyMemory((PUINT8)VirtualAddress,
|
||||||
(PUINT8)SafeMdl->Buffer + ByteOffsetBgn0, ByteOffsetEnd0 - ByteOffsetBgn0);
|
(PUINT8)SafeMdl->Buffer + ByteOffsetBgn0, ByteOffsetEnd0 - ByteOffsetBgn0);
|
||||||
if (Buffer1)
|
if (Buffer1)
|
||||||
RtlCopyMemory((PUINT8)VirtualAddress + (PageCount - 1) * PAGE_SIZE,
|
RtlCopyMemory(PAGE_ALIGN((PUINT8)VirtualAddress + (PageCount - 1) * PAGE_SIZE),
|
||||||
(PUINT8)SafeMdl->Buffer + (BufferPageCount - 1) * PAGE_SIZE, ByteOffsetEnd1);
|
(PUINT8)SafeMdl->Buffer + (BufferPageCount - 1) * PAGE_SIZE, ByteOffsetEnd1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user