From f3020200a015776fb99801b8d6d942e9c46e0401 Mon Sep 17 00:00:00 2001 From: neru Date: Sat, 21 Mar 2026 23:55:10 -0300 Subject: [PATCH] fix: use zeromemory for initialization (wtf) --- src/unlocker/cert_manager.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/unlocker/cert_manager.cpp b/src/unlocker/cert_manager.cpp index cef01cc..15a3eda 100644 --- a/src/unlocker/cert_manager.cpp +++ b/src/unlocker/cert_manager.cpp @@ -13,6 +13,7 @@ #include #include +#include std::string randomizeString(size_t length) { @@ -133,9 +134,11 @@ bool CertManager::GenerateCA() Log::info("Generated new CA key and certificate files. Installing to Windows Root CA store automatically..."); - STARTUPINFOA si = {0}; + STARTUPINFOA si; + memset(&si, 0, sizeof(si)); si.cb = sizeof(si); - PROCESS_INFORMATION pi = {0}; + PROCESS_INFORMATION pi; + memset(&pi, 0, sizeof(pi)); char cmd[] = "certutil.exe -user -addstore root ca_cert.pem"; if (CreateProcessA(NULL, cmd, NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi)) {