[NTOSKRNL]

Slightly improve SeCaptureSidAndAttributesArray

svn path=/trunk/; revision=61663
This commit is contained in:
Timo Kreuzer 2014-01-17 23:13:38 +00:00
parent b9fdfea09e
commit 208577d8ea

View file

@ -503,9 +503,6 @@ SeCaptureSidAndAttributesArray(
}
else
{
/* First copy the source array */
RtlCopyMemory(SidAndAttributes, SrcSidAndAttributes, ArraySize);
/* The rest of the data starts after the array */
CurrentDest = (PUCHAR)SidAndAttributes;
CurrentDest += ALIGN_UP_BY(ArraySize, sizeof(ULONG));
@ -517,6 +514,9 @@ SeCaptureSidAndAttributesArray(
Sid = SrcSidAndAttributes[i].Sid;
SidLength = RtlLengthRequiredSid(Sid->SubAuthorityCount);
/* Copy attributes */
SidAndAttributes[i].Attributes = SrcSidAndAttributes[i].Attributes;
/* Copy the SID to the current destination address */
SidAndAttributes[i].Sid = (PSID)CurrentDest;
RtlCopyMemory(CurrentDest, SrcSidAndAttributes[i].Sid, SidLength);