You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 21, 2025. It is now read-only.
ParseCommandLine() calls CommandLineToArgvW. The returned string must be freed by the caller with LocalFree.
BOOL ParseCommandLine()
{
LPWSTR pwszCommandLine = GetCommandLine();
LPWSTR* argv = NULL;
int argc = 0;
int i = 0;
! argv = CommandLineToArgvW(pwszCommandLine, &argc); <<< this memory must be freed with LocalFree
if (!argv)
return FALSE;
...
See https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-commandlinetoargvw:
CommandLineToArgvW allocates a block of contiguous memory for pointers to the argument strings, and for the argument strings themselves; the calling application must free the memory used by the argument list when it is no longer needed. To free the memory, use a single call to the LocalFree function.
ParseCommandLine()callsCommandLineToArgvW. The returned string must be freed by the caller withLocalFree.BOOL ParseCommandLine() { LPWSTR pwszCommandLine = GetCommandLine(); LPWSTR* argv = NULL; int argc = 0; int i = 0; ! argv = CommandLineToArgvW(pwszCommandLine, &argc); <<< this memory must be freed with LocalFree if (!argv) return FALSE; ...PPLGuard/PPLGuardDll/dllexploit.cpp
Line 600 in a8614b2
See https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-commandlinetoargvw:
CommandLineToArgvW allocates a block of contiguous memory for pointers to the argument strings, and for the argument strings themselves; the calling application must free the memory used by the argument list when it is no longer needed. To free the memory, use a single call to the LocalFree function.