mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
- Add NULL pointer check. Found by Amine Khaldi.
svn path=/trunk/; revision=43033
This commit is contained in:
parent
6672b72619
commit
2ff9fd5fcf
1 changed files with 5 additions and 2 deletions
|
@ -1200,11 +1200,14 @@ LookupAccountSidW(LPCWSTR pSystemName,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
*pdwDomainName = dwSrcLen;
|
*pdwDomainName = dwSrcLen;
|
||||||
|
if (pDomainName)
|
||||||
|
{
|
||||||
RtlCopyMemory ( pDomainName, ReferencedDomain->Domains[0].Name.Buffer, ReferencedDomain->Domains[0].Name.Length );
|
RtlCopyMemory ( pDomainName, ReferencedDomain->Domains[0].Name.Buffer, ReferencedDomain->Domains[0].Name.Length );
|
||||||
pDomainName[ReferencedDomain->Domains[0].Name.Length / sizeof(WCHAR)] = L'\0';
|
pDomainName[ReferencedDomain->Domains[0].Name.Length / sizeof(WCHAR)] = L'\0';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( !ret )
|
if ( !ret )
|
||||||
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||||
|
|
Loading…
Reference in a new issue