summaryrefslogtreecommitdiffstats
path: root/chromium/sandbox/win/src/interception.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/sandbox/win/src/interception.cc')
-rw-r--r--chromium/sandbox/win/src/interception.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/chromium/sandbox/win/src/interception.cc b/chromium/sandbox/win/src/interception.cc
index dde585735f1..5439db65b53 100644
--- a/chromium/sandbox/win/src/interception.cc
+++ b/chromium/sandbox/win/src/interception.cc
@@ -17,7 +17,6 @@
#include "sandbox/win/src/interception_internal.h"
#include "sandbox/win/src/interceptors.h"
#include "sandbox/win/src/sandbox.h"
-#include "sandbox/win/src/sandbox_utils.h"
#include "sandbox/win/src/service_resolver.h"
#include "sandbox/win/src/target_interceptions.h"
#include "sandbox/win/src/target_process.h"
@@ -399,7 +398,7 @@ bool InterceptionManager::PatchNtdll(bool hot_patch_needed) {
thunk_offset &= kPageSize - 1;
// Make an aligned, padded allocation, and move the pointer to our chunk.
- size_t thunk_bytes_padded = (thunk_bytes + kPageSize - 1) & kPageSize;
+ size_t thunk_bytes_padded = (thunk_bytes + kPageSize - 1) & ~(kPageSize - 1);
thunk_base = reinterpret_cast<BYTE*>(
::VirtualAllocEx(child, thunk_base, thunk_bytes_padded,
MEM_COMMIT, PAGE_EXECUTE_READWRITE));
@@ -483,8 +482,6 @@ bool InterceptionManager::PatchClientFunctions(DllInterceptionData* thunks,
thunk = new Wow64W8ResolverThunk(child_->Process(), relaxed_);
else
thunk = new Wow64ResolverThunk(child_->Process(), relaxed_);
- } else if (!IsXPSP2OrLater()) {
- thunk = new Win2kResolverThunk(child_->Process(), relaxed_);
} else if (os_info->version() >= base::win::VERSION_WIN8) {
thunk = new Win8ResolverThunk(child_->Process(), relaxed_);
} else {