Commit a3e0bc10 authored by Paul Bryan Roberts's avatar Paul Bryan Roberts Committed by Alexandre Julliard

advapi32: LookupAccountNameW() - correct call in SetEntriesInAclW().

parent 04cccae9
......@@ -2541,7 +2541,7 @@ BOOL WINAPI LookupAccountNameW( LPCWSTR lpSystemName, LPCWSTR lpAccountName, PSI
domainName = ACCOUNT_SIDS[i].domain;
nameLen = strlenW(domainName);
if (*cchReferencedDomainName <= nameLen && ReferencedDomainName)
if (*cchReferencedDomainName <= nameLen || !ret)
{
SetLastError(ERROR_INSUFFICIENT_BUFFER);
nameLen += 1;
......@@ -3244,7 +3244,7 @@ DWORD WINAPI SetEntriesInAclW( ULONG count, PEXPLICIT_ACCESSW pEntries,
case TRUSTEE_IS_NAME:
{
DWORD sid_size = FIELD_OFFSET(SID, SubAuthority[SID_MAX_SUB_AUTHORITIES]);
DWORD domain_size = 0;
DWORD domain_size = MAX_COMPUTERNAME_LENGTH + 1;
SID_NAME_USE use;
if (!LookupAccountNameW(NULL, pEntries[i].Trustee.ptstrName, ppsid[i], &sid_size, NULL, &domain_size, &use))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment