mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
- Round up requested amount of memory instead of down
- Simplify space check, old version didn't work because of signed/unsigned issues svn path=/trunk/; revision=11045
This commit is contained in:
parent
79c3ba475a
commit
95210d36ee
1 changed files with 2 additions and 3 deletions
|
@ -133,8 +133,7 @@ RtlpAddKnownAce (PACL Acl,
|
|||
{
|
||||
return(STATUS_ALLOTTED_SPACE_EXCEEDED);
|
||||
}
|
||||
if (((PVOID)Ace + RtlLengthSid(Sid) + sizeof(ACE)) >=
|
||||
((PVOID)Acl + Acl->AclSize))
|
||||
if (RtlLengthSid(Sid) + sizeof(ACE) > Acl->AclSize)
|
||||
{
|
||||
return(STATUS_ALLOTTED_SPACE_EXCEEDED);
|
||||
}
|
||||
|
@ -551,7 +550,7 @@ RtlCreateAcl(PACL Acl,
|
|||
return(STATUS_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
AclSize = AclSize & ~(0x3);
|
||||
AclSize = (AclSize + 3) & ~(0x3);
|
||||
Acl->AclSize = AclSize;
|
||||
Acl->AclRevision = AclRevision;
|
||||
Acl->AceCount = 0;
|
||||
|
|
Loading…
Reference in a new issue