diff --git a/reactos/drivers/filesystems/npfs/rw.c b/reactos/drivers/filesystems/npfs/rw.c index 6f8675ed754..5a03977a788 100644 --- a/reactos/drivers/filesystems/npfs/rw.c +++ b/reactos/drivers/filesystems/npfs/rw.c @@ -781,7 +781,16 @@ NpfsWrite(PDEVICE_OBJECT DeviceObject, } Status = STATUS_SUCCESS; - Buffer = MmGetSystemAddressForMdl (Irp->MdlAddress); + Buffer = MmGetSystemAddressForMdlSafe (Irp->MdlAddress, NormalPagePriority); + + if (!Buffer) + { + DPRINT("MmGetSystemAddressForMdlSafe failed\n"); + Status = STATUS_INSUFFICIENT_RESOURCES; + Length = 0; + goto done; + + } ExAcquireFastMutex(&ReaderCcb->DataListLock);