diff options
author | rnk <rnk@chromium.org> | 2015-02-19 16:01:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-20 00:02:33 +0000 |
commit | 4ede4e174a51d08262edfb2e2c05845504bd9b1a (patch) | |
tree | 289d16470eb5f31f734274da07eea148b7cbcc59 /chrome_elf | |
parent | 638a47d2e2494281f5c15bc24d2d1ea3c0cf14a1 (diff) | |
download | chromium_src-4ede4e174a51d08262edfb2e2c05845504bd9b1a.zip chromium_src-4ede4e174a51d08262edfb2e2c05845504bd9b1a.tar.gz chromium_src-4ede4e174a51d08262edfb2e2c05845504bd9b1a.tar.bz2 |
sandbox: Fix some nt_internals.h function prototypes for Win64
NtQuerySection should use ULONG instead of SIZE_T as it is dealing with PE section sizes.
NtQueryVirtualMemory should use SIZE_T instead of ULONG as it is dealing with memory sizes.
DynamoRIO, another project that consumes these native APIs, uses the prototypes introduced by this change.
R=robertshield@chromium.org,rvargas@chromium.org
BUG=458690
Review URL: https://codereview.chromium.org/921353002
Cr-Commit-Position: refs/heads/master@{#317177}
Diffstat (limited to 'chrome_elf')
-rw-r--r-- | chrome_elf/blacklist/blacklist_interceptions.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome_elf/blacklist/blacklist_interceptions.cc b/chrome_elf/blacklist/blacklist_interceptions.cc index 28eb692..465f017 100644 --- a/chrome_elf/blacklist/blacklist_interceptions.cc +++ b/chrome_elf/blacklist/blacklist_interceptions.cc @@ -51,7 +51,7 @@ base::string16 GetBackingModuleFilePath(PVOID address) { DCHECK_NT(g_nt_query_virtual_memory_func); // We'll start with something close to max_path characters for the name. - ULONG buffer_bytes = MAX_PATH * 2; + SIZE_T buffer_bytes = MAX_PATH * 2; std::vector<BYTE> buffer_data(buffer_bytes); for (;;) { @@ -61,7 +61,7 @@ base::string16 GetBackingModuleFilePath(PVOID address) { if (!section_name) break; - ULONG returned_bytes; + SIZE_T returned_bytes; NTSTATUS ret = g_nt_query_virtual_memory_func( NtCurrentProcess, address, MemorySectionName, section_name, buffer_bytes, &returned_bytes); @@ -95,7 +95,7 @@ bool IsModuleValidImageSection(HANDLE section, return false; SECTION_BASIC_INFORMATION basic_info; - SIZE_T bytes_returned; + ULONG bytes_returned; NTSTATUS ret = g_nt_query_section_func(section, SectionBasicInformation, &basic_info, sizeof(basic_info), &bytes_returned); |