Commit 9df9cb84 authored by jschuh@chromium.org's avatar jschuh@chromium.org

Fix masking error in InterceptionManager::PatchNtdll

BUG=344415
R=rvargas
TBR=rvargas
NOTRY=true

Review URL: https://codereview.chromium.org/215363005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260135 0039d316-1c4b-4281-b951-d872f2087c98
parent e8fde446
...@@ -399,7 +399,7 @@ bool InterceptionManager::PatchNtdll(bool hot_patch_needed) { ...@@ -399,7 +399,7 @@ bool InterceptionManager::PatchNtdll(bool hot_patch_needed) {
thunk_offset &= kPageSize - 1; thunk_offset &= kPageSize - 1;
// Make an aligned, padded allocation, and move the pointer to our chunk. // 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*>( thunk_base = reinterpret_cast<BYTE*>(
::VirtualAllocEx(child, thunk_base, thunk_bytes_padded, ::VirtualAllocEx(child, thunk_base, thunk_bytes_padded,
MEM_COMMIT, PAGE_EXECUTE_READWRITE)); MEM_COMMIT, PAGE_EXECUTE_READWRITE));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment