use the recommended securezeromemory

This commit is contained in:
otavepto 2023-12-24 06:40:33 +02:00
parent 0b8eb76bdd
commit 21ac6c7a17

View File

@ -71,22 +71,22 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance
WCHAR TMP[MAX_PATH] = {};
if (!IsNotRelativePathOrRemoveFileName(Client64Path, false)) {
lstrcpyW(TMP, Client64Path);
ZeroMemory(Client64Path, sizeof(Client64Path));
SecureZeroMemory(Client64Path, sizeof(Client64Path));
GetFullPathNameW(TMP, MAX_PATH, Client64Path, NULL);
}
if (!IsNotRelativePathOrRemoveFileName(ClientPath, false)) {
lstrcpyW(TMP, ClientPath);
ZeroMemory(ClientPath, sizeof(ClientPath));
SecureZeroMemory(ClientPath, sizeof(ClientPath));
GetFullPathNameW(TMP, MAX_PATH, ClientPath, NULL);
}
if (!IsNotRelativePathOrRemoveFileName(ExeFile, false)) {
lstrcpyW(TMP, ExeFile);
ZeroMemory(ExeFile, sizeof(ExeFile));
SecureZeroMemory(ExeFile, sizeof(ExeFile));
GetFullPathNameW(TMP, MAX_PATH, ExeFile, NULL);
}
if (!IsNotRelativePathOrRemoveFileName(ExeRunDir, false)) {
lstrcpyW(TMP, ExeRunDir);
ZeroMemory(ExeRunDir, sizeof(ExeRunDir));
SecureZeroMemory(ExeRunDir, sizeof(ExeRunDir));
GetFullPathNameW(TMP, MAX_PATH, ExeRunDir, NULL);
}