WINAPI
GetSidIdentifierAuthority(PSID pSid)
{
+ SetLastError(ERROR_SUCCESS);
return RtlIdentifierAuthoritySid(pSid);
}
DWORD flags = 0;
LPCWSTR szAcl = *StringAcl;
- while (*szAcl != '(')
+ while (*szAcl && *szAcl != '(')
{
if (*szAcl == 'P')
{
pAcl->AclRevision = ACL_REVISION;
pAcl->Sbz1 = 0;
pAcl->AclSize = length;
- pAcl->AceCount = acecount++;
+ pAcl->AceCount = acecount;
pAcl->Sbz2 = 0;
}
return TRUE;
return FALSE;
}
-
/******************************************************************************
* ParseStringSecurityDescriptorToSecurityDescriptor
*/
LPBYTE lpNext = NULL;
DWORD len;
- *cBytes = sizeof(SECURITY_DESCRIPTOR);
+ *cBytes = sizeof(SECURITY_DESCRIPTOR_RELATIVE);
tok = heap_alloc( (lstrlenW(StringSecurityDescriptor) + 1) * sizeof(WCHAR));