From 0b8eb76bdd0af371108ff580f43919ffa768f2e0 Mon Sep 17 00:00:00 2001 From: otavepto <153766569+otavepto@users.noreply.github.com> Date: Sun, 24 Dec 2023 06:39:42 +0200 Subject: [PATCH] use the suggested way in the docs to zero-out these structs --- steamclient_loader/ColdClientLoader.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/steamclient_loader/ColdClientLoader.cpp b/steamclient_loader/ColdClientLoader.cpp index 0f327dc5..02692750 100644 --- a/steamclient_loader/ColdClientLoader.cpp +++ b/steamclient_loader/ColdClientLoader.cpp @@ -33,8 +33,12 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance WCHAR ExeCommandLine[4096] = { 0 }; WCHAR AppId[128] = { 0 }; - STARTUPINFOW info = { sizeof(info) }; - PROCESS_INFORMATION processInfo; + STARTUPINFOW info = { 0 }; + SecureZeroMemory(&info, sizeof(info)); + info.cb = sizeof(info); + + PROCESS_INFORMATION processInfo = { 0 }; + SecureZeroMemory(&processInfo, sizeof(processInfo)); int Length = GetModuleFileNameW(GetModuleHandleW(NULL), CurrentDirectory, sizeof(CurrentDirectory)) + 1; for (int i = Length; i > 0; i--) {