mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +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,
|
WideCharToMultiByte(CP_ACP,
|
||||||
0,
|
0,
|
||||||
lpReferencedDomainNameW,
|
lpReferencedDomainNameW,
|
||||||
*hReferencedDomainNameLength,
|
*hReferencedDomainNameLength + 1,
|
||||||
ReferencedDomainName,
|
ReferencedDomainName,
|
||||||
*hReferencedDomainNameLength,
|
*hReferencedDomainNameLength + 1,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
@ -1343,13 +1343,16 @@ LookupAccountNameW(LPCWSTR lpSystemName,
|
||||||
if (ReferencedDomainName != NULL && (*cchReferencedDomainName > wcslen(dm)))
|
if (ReferencedDomainName != NULL && (*cchReferencedDomainName > wcslen(dm)))
|
||||||
wcscpy(ReferencedDomainName, dm);
|
wcscpy(ReferencedDomainName, dm);
|
||||||
|
|
||||||
if (*cchReferencedDomainName <= wcslen(dm))
|
if ((*cchReferencedDomainName <= wcslen(dm)) || (!ret))
|
||||||
{
|
{
|
||||||
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
|
*cchReferencedDomainName = wcslen(dm) + 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*cchReferencedDomainName = wcslen(dm);
|
||||||
}
|
}
|
||||||
|
|
||||||
*cchReferencedDomainName = wcslen(dm)+1;
|
|
||||||
|
|
||||||
FreeSid(pSid);
|
FreeSid(pSid);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue