mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-23 17:03:12 -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;
|
||||
BOOLEAN Success;
|
||||
|
||||
FspSafeMdlCopyBack(SafeMdl);
|
||||
if (0 != SafeMdl)
|
||||
FspSafeMdlCopyBack(SafeMdl);
|
||||
|
||||
if (!PagingIo)
|
||||
{
|
||||
|
@ -592,7 +592,7 @@ NTSTATUS FspSafeMdlCreate(PMDL UserMdl, LOCK_OPERATION Operation, FSP_SAFE_MDL *
|
||||
if (Buffer1)
|
||||
{
|
||||
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,
|
||||
PAGE_SIZE - ByteOffsetEnd1);
|
||||
SafePfnArray[PageCount - 1] = TempPfnArray[BufferPageCount - 1];
|
||||
@ -680,7 +680,7 @@ VOID FspSafeMdlCopyBack(FSP_SAFE_MDL *SafeMdl)
|
||||
RtlCopyMemory((PUINT8)VirtualAddress,
|
||||
(PUINT8)SafeMdl->Buffer + ByteOffsetBgn0, ByteOffsetEnd0 - ByteOffsetBgn0);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user