Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: sandbox/win/wow_helper/wow_helper.cc

Issue 1539423002: Revert of Switch to standard integer types in sandbox/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sandbox/win/wow_helper/service64_resolver.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Wow_helper.exe is a simple Win32 64-bit executable designed to help to 5 // Wow_helper.exe is a simple Win32 64-bit executable designed to help to
6 // sandbox a 32 bit application running on a 64 bit OS. The basic idea is to 6 // sandbox a 32 bit application running on a 64 bit OS. The basic idea is to
7 // perform a 64 bit interception of the target process and notify the 32-bit 7 // perform a 64 bit interception of the target process and notify the 32-bit
8 // broker process whenever a DLL is being loaded. This allows the broker to 8 // broker process whenever a DLL is being loaded. This allows the broker to
9 // setup the interceptions (32-bit) properly on the target. 9 // setup the interceptions (32-bit) properly on the target.
10 10
11 #include <windows.h> 11 #include <windows.h>
12 #include <stddef.h>
13 12
14 #include <string> 13 #include <string>
15 14
16 #include "sandbox/win/wow_helper/service64_resolver.h" 15 #include "sandbox/win/wow_helper/service64_resolver.h"
17 #include "sandbox/win/wow_helper/target_code.h" 16 #include "sandbox/win/wow_helper/target_code.h"
18 17
19 namespace sandbox { 18 namespace sandbox {
20 19
21 // Performs the interception of NtMapViewOfSection on the 64-bit version of 20 // Performs the interception of NtMapViewOfSection on the 64-bit version of
22 // ntdll.dll. 'thunk' is the buffer on the address space of process 'child', 21 // ntdll.dll. 'thunk' is the buffer on the address space of process 'child',
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 77
79 DWORD buffer = wcstoul(next, NULL, 0); 78 DWORD buffer = wcstoul(next, NULL, 0);
80 if (!buffer) 79 if (!buffer)
81 return 4; 80 return 4;
82 81
83 void* thunk = reinterpret_cast<void*>(static_cast<ULONG_PTR>(buffer)); 82 void* thunk = reinterpret_cast<void*>(static_cast<ULONG_PTR>(buffer));
84 83
85 const size_t kPageSize = 4096; 84 const size_t kPageSize = 4096;
86 return sandbox::PatchNtdll(child, thunk, kPageSize); 85 return sandbox::PatchNtdll(child, thunk, kPageSize);
87 } 86 }
OLDNEW
« no previous file with comments | « sandbox/win/wow_helper/service64_resolver.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698