mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00: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:
parent
d01184b164
commit
9ecbbe2a33
1 changed files with 6 additions and 6 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue