From 6dceccddaadae7701b6132396e214e86d336b1b3 Mon Sep 17 00:00:00 2001 From: vxunderground <57078196+vxunderground@users.noreply.github.com> Date: Fri, 15 Jul 2022 12:10:59 -0500 Subject: [PATCH] Update RfGetEnvironmentVariable.cpp --- Windows API/RfGetEnvironmentVariable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Windows API/RfGetEnvironmentVariable.cpp b/Windows API/RfGetEnvironmentVariable.cpp index 9b56397..408fa6d 100644 --- a/Windows API/RfGetEnvironmentVariable.cpp +++ b/Windows API/RfGetEnvironmentVariable.cpp @@ -81,7 +81,7 @@ DWORD RfGetEnvironmentVariableA(LPCSTR Name, LPSTR Buffer, DWORD Size, BOOL UseA if (String == NULL) goto EXIT_ROUTINE; - pwName = (LPWSTR)RtlHeapAllocForward(256); + pwName = (LPWSTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(WCHAR) * 2); if (pwName == NULL) goto EXIT_ROUTINE;