From: Pierre Schweitzer Date: Sun, 26 Nov 2017 13:01:04 +0000 (+0100) Subject: [NTOSKRNL] Use ExAllocatePoolWithQuotaTag() when allocating SystemBuffer for the IRP X-Git-Tag: good~57 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=9ecbbe2a338619c9d9f7c52a6e7af24adc5fb174 [NTOSKRNL] Use ExAllocatePoolWithQuotaTag() when allocating SystemBuffer for the IRP That way, in case the system lacks memory, an exception is thrown and IRP isn't sent to the device with NULL SystemBuffer. CORE-14048 --- diff --git a/ntoskrnl/io/iomgr/iofunc.c b/ntoskrnl/io/iomgr/iofunc.c index bde78e4f963..19f54e070df 100644 --- a/ntoskrnl/io/iomgr/iofunc.c +++ b/ntoskrnl/io/iomgr/iofunc.c @@ -516,9 +516,9 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle, { /* Allocate the System Buffer */ Irp->AssociatedIrp.SystemBuffer = - ExAllocatePoolWithTag(PoolType, - BufferLength, - TAG_SYS_BUF); + ExAllocatePoolWithQuotaTag(PoolType, + BufferLength, + TAG_SYS_BUF); /* Check if we got a buffer */ if (InputBuffer) @@ -563,9 +563,9 @@ IopDeviceFsIoControl(IN HANDLE DeviceHandle, { /* Allocate the System Buffer */ Irp->AssociatedIrp.SystemBuffer = - ExAllocatePoolWithTag(PoolType, - InputBufferLength, - TAG_SYS_BUF); + ExAllocatePoolWithQuotaTag(PoolType, + InputBufferLength, + TAG_SYS_BUF); /* Copy into the System Buffer */ RtlCopyMemory(Irp->AssociatedIrp.SystemBuffer,