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
Hello, I found a memory leak on this line, whenever call_function is called it's allocate a new page, is missing an if or make the call after the declaration of the variable allocated_shellcode.
Fix:
static void* allocated_shellcode = nullptr;
if ( !allocated_shellcode )
{
// MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE
allocated_shellcode =
VirtualAlloc(nullptr, sizeof( shellcode ), 0x00001000 | 0x00002000, 0x40);
if ( !allocated_shellcode )
detail::throw_last_error(
"VirtualAlloc failed to allocate memory for call_function shellcode" );
}
Hello, I found a memory leak on this line, whenever call_function is called it's allocate a new page, is missing an if or make the call after the declaration of the variable allocated_shellcode.
Fix:
Alternative fix:
The text was updated successfully, but these errors were encountered: