mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 13:43:42 +00:00
[ADVAPI32] Fix crash when running advapi32:security with DPH.
Import the following Wine commits: * 79636bebbfa Michael Müller: advapi32: Set last error to ERROR_SUCCESS in GetSidIdentifierAuthority. * 1d03ba76116 Hans Leidekker: advapi32: Fix parsing empty DACL/SACL security descriptor strings. * 5bc2e83c7ab Hans Leidekker: advapi32: Fix size returned from ConvertStringSecurityDescriptorToSecurityDescriptor on 64-bit.
This commit is contained in:
parent
05b4bd3833
commit
95c3e17a80
1 changed files with 4 additions and 4 deletions
|
@ -759,6 +759,7 @@ PSID_IDENTIFIER_AUTHORITY
|
|||
WINAPI
|
||||
GetSidIdentifierAuthority(PSID pSid)
|
||||
{
|
||||
SetLastError(ERROR_SUCCESS);
|
||||
return RtlIdentifierAuthoritySid(pSid);
|
||||
}
|
||||
|
||||
|
@ -2227,7 +2228,7 @@ static DWORD ParseAclStringFlags(LPCWSTR* StringAcl)
|
|||
DWORD flags = 0;
|
||||
LPCWSTR szAcl = *StringAcl;
|
||||
|
||||
while (*szAcl != '(')
|
||||
while (*szAcl && *szAcl != '(')
|
||||
{
|
||||
if (*szAcl == 'P')
|
||||
{
|
||||
|
@ -2538,7 +2539,7 @@ static BOOL ParseStringAclToAcl(LPCWSTR StringAcl, LPDWORD lpdwFlags,
|
|||
pAcl->AclRevision = ACL_REVISION;
|
||||
pAcl->Sbz1 = 0;
|
||||
pAcl->AclSize = length;
|
||||
pAcl->AceCount = acecount++;
|
||||
pAcl->AceCount = acecount;
|
||||
pAcl->Sbz2 = 0;
|
||||
}
|
||||
return TRUE;
|
||||
|
@ -2549,7 +2550,6 @@ lerr:
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* ParseStringSecurityDescriptorToSecurityDescriptor
|
||||
*/
|
||||
|
@ -2565,7 +2565,7 @@ static BOOL ParseStringSecurityDescriptorToSecurityDescriptor(
|
|||
LPBYTE lpNext = NULL;
|
||||
DWORD len;
|
||||
|
||||
*cBytes = sizeof(SECURITY_DESCRIPTOR);
|
||||
*cBytes = sizeof(SECURITY_DESCRIPTOR_RELATIVE);
|
||||
|
||||
tok = heap_alloc( (lstrlenW(StringSecurityDescriptor) + 1) * sizeof(WCHAR));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue