From faeb8f6a5524dded1f97c16dee4b09dce548bae4 Mon Sep 17 00:00:00 2001 From: jfb Date: Fri, 20 Feb 2015 13:46:56 -0800 Subject: Revert of sandbox: Fix Win64 porting issue by using SIZE_T instead of ULONG (patchset #3 id:40001 of https://codereview.chromium.org/921353002/) Reason for revert: Speculative revert after discussion on IRC, this seems pretty unlikely but may have caused the failures at: http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/35506 Original issue's description: > 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 > > Committed: https://crrev.com/4ede4e174a51d08262edfb2e2c05845504bd9b1a > Cr-Commit-Position: refs/heads/master@{#317177} TBR=jschuh@chromium.org,robertshield@chromium.org,thakis@chromium.org,wfh@chromium.org,rvargas@chromium.org,rnk@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=458690 Review URL: https://codereview.chromium.org/943043002 Cr-Commit-Position: refs/heads/master@{#317409} --- chrome_elf/blacklist/blacklist_interceptions.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'chrome_elf') diff --git a/chrome_elf/blacklist/blacklist_interceptions.cc b/chrome_elf/blacklist/blacklist_interceptions.cc index 465f017..28eb692 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. - SIZE_T buffer_bytes = MAX_PATH * 2; + ULONG buffer_bytes = MAX_PATH * 2; std::vector buffer_data(buffer_bytes); for (;;) { @@ -61,7 +61,7 @@ base::string16 GetBackingModuleFilePath(PVOID address) { if (!section_name) break; - SIZE_T returned_bytes; + ULONG 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; - ULONG bytes_returned; + SIZE_T bytes_returned; NTSTATUS ret = g_nt_query_section_func(section, SectionBasicInformation, &basic_info, sizeof(basic_info), &bytes_returned); -- cgit v1.1