Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed duplicated address checks from memory read/write opcodes. #112

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions cleo_plugins/MemoryOperations/MemoryOperations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,6 @@ class MemoryOperations
auto virtualProtect = OPCODE_READ_PARAM_BOOL();

// validate params
if ((size_t)address <= MinValidAddress)
{
SHOW_ERROR("Invalid '0x%X' pointer param in script %s\nScript suspended.", address, ScriptInfoStr(thread).c_str());
return thread->Suspend();
}

if (size < 0)
{
SHOW_ERROR("Invalid '%d' size argument in script %s\nScript suspended.", size, ScriptInfoStr(thread).c_str());
Expand Down Expand Up @@ -263,12 +257,6 @@ class MemoryOperations
auto virtualProtect = OPCODE_READ_PARAM_BOOL();

// validate params
if ((size_t)address <= MinValidAddress)
{
SHOW_ERROR("Invalid '0x%X' pointer param of in script %s\nScript suspended.", address, ScriptInfoStr(thread).c_str());
return thread->Suspend();
}

if (size < 0 || size > sizeof(SCRIPT_VAR))
{
SHOW_ERROR("Invalid '%d' size argument in script %s\nScript suspended.", size, ScriptInfoStr(thread).c_str());
Expand Down