mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
fix some security winetests
svn path=/trunk/; revision=38472
This commit is contained in:
parent
fa4a7deb60
commit
fd09fafa0b
1 changed files with 8 additions and 5 deletions
|
@ -1261,9 +1261,9 @@ LookupAccountNameA(LPCSTR SystemName,
|
|||
WideCharToMultiByte(CP_ACP,
|
||||
0,
|
||||
lpReferencedDomainNameW,
|
||||
*hReferencedDomainNameLength,
|
||||
*hReferencedDomainNameLength + 1,
|
||||
ReferencedDomainName,
|
||||
*hReferencedDomainNameLength,
|
||||
*hReferencedDomainNameLength + 1,
|
||||
NULL,
|
||||
NULL);
|
||||
}
|
||||
|
@ -1343,13 +1343,16 @@ LookupAccountNameW(LPCWSTR lpSystemName,
|
|||
if (ReferencedDomainName != NULL && (*cchReferencedDomainName > wcslen(dm)))
|
||||
wcscpy(ReferencedDomainName, dm);
|
||||
|
||||
if (*cchReferencedDomainName <= wcslen(dm))
|
||||
if ((*cchReferencedDomainName <= wcslen(dm)) || (!ret))
|
||||
{
|
||||
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||
ret = FALSE;
|
||||
*cchReferencedDomainName = wcslen(dm) + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
*cchReferencedDomainName = wcslen(dm);
|
||||
}
|
||||
|
||||
*cchReferencedDomainName = wcslen(dm)+1;
|
||||
|
||||
FreeSid(pSid);
|
||||
|
||||
|
|
Loading…
Reference in a new issue