mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 18:01:07 +00:00
[TASKMGR] CachedGetUserFromSid(): Fix user name length on cache hit
This commit is contained in:
parent
353b544047
commit
f91144364b
|
@ -144,16 +144,16 @@ CachedGetUserFromSid(
|
|||
if (EqualSid((PSID)&pEntry->Data, pSid))
|
||||
{
|
||||
wcsncpy(pUserName, pEntry->pszName, cwcUserName);
|
||||
*pcwcUserName = cwcUserName;
|
||||
*pcwcUserName = wcslen(pUserName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* We didn't find the SID in the list, get the name conventional */
|
||||
SidToUserName(pSid, pUserName, cwcUserName);
|
||||
*pcwcUserName = wcslen(pUserName);
|
||||
|
||||
/* Allocate a new entry */
|
||||
*pcwcUserName = wcslen(pUserName);
|
||||
cwcUserName = *pcwcUserName + 1;
|
||||
cbSid = GetLengthSid(pSid);
|
||||
pEntry = HeapAlloc(GetProcessHeap(), 0, sizeof(SIDTOUSERNAME) + cbSid + cwcUserName * sizeof(WCHAR));
|
||||
|
|
Loading…
Reference in a new issue