mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 15:21:59 +00:00
[TASKMGR] CachedGetUserFromSid(): Fix user name length on cache hit
This commit is contained in:
parent
353b544047
commit
f91144364b
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue