mirror of
https://github.com/reactos/reactos.git
synced 2026-06-08 17:02:56 +08:00
[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
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user