mirror of
https://github.com/winfsp/winfsp.git
synced 2025-04-22 08:23:05 -05:00
sys: FspBufferUserBuffer: special case Irp->UserBuffer kernel address
This commit is contained in:
parent
90bc12132e
commit
912703cd77
@ -608,6 +608,13 @@ NTSTATUS FspBufferUserBuffer(PIRP Irp, ULONG Length, LOCK_OPERATION Operation)
|
|||||||
if (0 == Length || 0 != Irp->AssociatedIrp.SystemBuffer)
|
if (0 == Length || 0 != Irp->AssociatedIrp.SystemBuffer)
|
||||||
return STATUS_SUCCESS;
|
return STATUS_SUCCESS;
|
||||||
|
|
||||||
|
if (KernelMode == Irp->RequestorMode &&
|
||||||
|
(PUINT8)MM_SYSTEM_RANGE_START <= (PUINT8)Irp->UserBuffer)
|
||||||
|
{
|
||||||
|
Irp->AssociatedIrp.SystemBuffer = Irp->UserBuffer;
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
PVOID SystemBuffer = FspAllocNonPagedExternal(Length);
|
PVOID SystemBuffer = FspAllocNonPagedExternal(Length);
|
||||||
if (0 == SystemBuffer)
|
if (0 == SystemBuffer)
|
||||||
return STATUS_INSUFFICIENT_RESOURCES;
|
return STATUS_INSUFFICIENT_RESOURCES;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user