mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[ADVAPI32] Avoid excessive allocation in CheckTokenMembership. CORE-16094
This commit is contained in:
parent
17bc3d69f9
commit
a303932803
1 changed files with 2 additions and 2 deletions
|
@ -100,7 +100,7 @@ CheckTokenMembership(IN HANDLE ExistingTokenHandle,
|
|||
0,
|
||||
sizeof(SECURITY_DESCRIPTOR) +
|
||||
sizeof(ACL) + SidLen +
|
||||
sizeof(ACCESS_ALLOWED_ACE));
|
||||
FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart));
|
||||
if (SecurityDescriptor == NULL)
|
||||
{
|
||||
Status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
|
@ -134,7 +134,7 @@ CheckTokenMembership(IN HANDLE ExistingTokenHandle,
|
|||
/* create the DACL */
|
||||
Dacl = (PACL)(SecurityDescriptor + 1);
|
||||
Status = RtlCreateAcl(Dacl,
|
||||
sizeof(ACL) + SidLen + sizeof(ACCESS_ALLOWED_ACE),
|
||||
sizeof(ACL) + SidLen + FIELD_OFFSET(ACCESS_ALLOWED_ACE, SidStart),
|
||||
ACL_REVISION);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue