taskmgr: Avoid wcsncpy().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
4da6dc6384
commit
85846bfbf4
|
@ -328,7 +328,7 @@ BOOL PerfDataGetImageName(ULONG Index, LPWSTR lpImageName, int nMaxCount)
|
||||||
EnterCriticalSection(&PerfDataCriticalSection);
|
EnterCriticalSection(&PerfDataCriticalSection);
|
||||||
|
|
||||||
if (Index < ProcessCount) {
|
if (Index < ProcessCount) {
|
||||||
wcsncpy(lpImageName, pPerfData[Index].ImageName, nMaxCount);
|
lstrcpynW(lpImageName, pPerfData[Index].ImageName, nMaxCount);
|
||||||
if (pPerfData[Index].Wow64Process &&
|
if (pPerfData[Index].Wow64Process &&
|
||||||
nMaxCount - lstrlenW(lpImageName) > 4 /* =lstrlenW(proc32W) */)
|
nMaxCount - lstrlenW(lpImageName) > 4 /* =lstrlenW(proc32W) */)
|
||||||
lstrcatW(lpImageName, proc32W);
|
lstrcatW(lpImageName, proc32W);
|
||||||
|
@ -363,7 +363,7 @@ BOOL PerfDataGetUserName(ULONG Index, LPWSTR lpUserName, int nMaxCount)
|
||||||
EnterCriticalSection(&PerfDataCriticalSection);
|
EnterCriticalSection(&PerfDataCriticalSection);
|
||||||
|
|
||||||
if (Index < ProcessCount) {
|
if (Index < ProcessCount) {
|
||||||
wcsncpy(lpUserName, pPerfData[Index].UserName, nMaxCount);
|
lstrcpynW(lpUserName, pPerfData[Index].UserName, nMaxCount);
|
||||||
bSuccessful = TRUE;
|
bSuccessful = TRUE;
|
||||||
} else {
|
} else {
|
||||||
bSuccessful = FALSE;
|
bSuccessful = FALSE;
|
||||||
|
|
Loading…
Reference in New Issue