summaryrefslogtreecommitdiffstats
path: root/sandbox/win/src
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/win/src')
-rw-r--r--sandbox/win/src/eat_resolver.cc4
-rw-r--r--sandbox/win/src/sidestep_resolver.cc4
2 files changed, 6 insertions, 2 deletions
diff --git a/sandbox/win/src/eat_resolver.cc b/sandbox/win/src/eat_resolver.cc
index 8e81820..154bfcf 100644
--- a/sandbox/win/src/eat_resolver.cc
+++ b/sandbox/win/src/eat_resolver.cc
@@ -41,7 +41,9 @@ NTSTATUS EatResolverThunk::Setup(const void* target_module,
return STATUS_BUFFER_TOO_SMALL;
AutoProtectMemory memory;
- memory.ChangeProtection(eat_entry_, sizeof(DWORD), PAGE_READWRITE);
+ ret = memory.ChangeProtection(eat_entry_, sizeof(DWORD), PAGE_READWRITE);
+ if (!NT_SUCCESS(ret))
+ return ret;
// Perform the patch.
#pragma warning(push)
diff --git a/sandbox/win/src/sidestep_resolver.cc b/sandbox/win/src/sidestep_resolver.cc
index 47c0f56..828c000 100644
--- a/sandbox/win/src/sidestep_resolver.cc
+++ b/sandbox/win/src/sidestep_resolver.cc
@@ -49,7 +49,9 @@ NTSTATUS SidestepResolverThunk::Setup(const void* target_module,
return STATUS_BUFFER_TOO_SMALL;
AutoProtectMemory memory;
- memory.ChangeProtection(target_, kSizeOfSidestepStub, PAGE_READWRITE);
+ ret = memory.ChangeProtection(target_, kSizeOfSidestepStub, PAGE_READWRITE);
+ if (!NT_SUCCESS(ret))
+ return ret;
sidestep::SideStepError rv = sidestep::PreamblePatcher::Patch(
target_, reinterpret_cast<void*>(&thunk->internal_thunk), thunk_storage,