[NTOS:MM]

- Correctly use POOL_BLOCK_SIZE in ExAllocatePoolWithQuotaTag

svn path=/trunk/; revision=60156
This commit is contained in:
Thomas Faber 2013-09-15 23:05:59 +00:00
parent 7f2ce261b2
commit aa7e029f28

View file

@ -2536,7 +2536,7 @@ ExAllocatePoolWithQuotaTag(IN POOL_TYPE PoolType,
// this isn't the system process, which never gets charged quota // this isn't the system process, which never gets charged quota
// //
ASSERT(NumberOfBytes != 0); ASSERT(NumberOfBytes != 0);
if ((NumberOfBytes <= (PAGE_SIZE - sizeof(POOL_BLOCK_SIZE) - sizeof(PVOID))) && if ((NumberOfBytes <= (PAGE_SIZE - POOL_BLOCK_SIZE - sizeof(PVOID))) &&
(Process != PsInitialSystemProcess)) (Process != PsInitialSystemProcess))
{ {
// //
@ -2589,7 +2589,7 @@ ExAllocatePoolWithQuotaTag(IN POOL_TYPE PoolType,
Entry = POOL_ENTRY(Buffer); Entry = POOL_ENTRY(Buffer);
Status = PsChargeProcessPoolQuota(Process, Status = PsChargeProcessPoolQuota(Process,
PoolType & BASE_POOL_TYPE_MASK, PoolType & BASE_POOL_TYPE_MASK,
Entry->BlockSize * sizeof(POOL_BLOCK_SIZE)); Entry->BlockSize * POOL_BLOCK_SIZE);
if (!NT_SUCCESS(Status)) if (!NT_SUCCESS(Status))
{ {
// //