feature: guardrail data

This commit is contained in:
Dobin Rutishauser
2024-06-18 16:05:37 +02:00
parent f84fd98416
commit ae3567847c
5 changed files with 21 additions and 1 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ int mystrcmp(wchar_t* str1, wchar_t* str2) {
int executionguardrail() {
// Execution Guardrail: Env Check
wchar_t envVarName[] = L"USERPROFILE";
wchar_t tocheck[] = L"C:\\Users\\";
wchar_t tocheck[] = L"{{guardrail_data}}";
WCHAR buffer[1024]; // NOTE: Do not make it bigger, or we have a __chkstack() dependency!
DWORD result = GetEnvironmentVariableW(envVarName, buffer, 1024);
if (result == 0) {