diff options
-rw-r--r-- | chrome_elf/blacklist/blacklist_interceptions.cc | 6 | ||||
-rw-r--r-- | sandbox/win/src/nt_internals.h | 8 | ||||
-rw-r--r-- | sandbox/win/src/sandbox_nt_util.cc | 6 |
3 files changed, 10 insertions, 10 deletions
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<BYTE> 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); diff --git a/sandbox/win/src/nt_internals.h b/sandbox/win/src/nt_internals.h index ade2d67..8b22e0e 100644 --- a/sandbox/win/src/nt_internals.h +++ b/sandbox/win/src/nt_internals.h @@ -250,8 +250,8 @@ typedef NTSTATUS (WINAPI *NtQuerySectionFunction)( IN HANDLE SectionHandle, IN SECTION_INFORMATION_CLASS SectionInformationClass, OUT PVOID SectionInformation, - IN ULONG SectionInformationLength, - OUT PULONG ReturnLength OPTIONAL); + IN SIZE_T SectionInformationLength, + OUT PSIZE_T ReturnLength OPTIONAL); // ----------------------------------------------------------------------- // Process and Thread @@ -450,8 +450,8 @@ typedef NTSTATUS (WINAPI *NtQueryVirtualMemoryFunction)( IN PVOID BaseAddress, IN MEMORY_INFORMATION_CLASS MemoryInformationClass, OUT PVOID MemoryInformation, - IN SIZE_T MemoryInformationLength, - OUT PSIZE_T ReturnLength OPTIONAL); + IN ULONG MemoryInformationLength, + OUT PULONG ReturnLength OPTIONAL); typedef NTSTATUS (WINAPI *NtProtectVirtualMemoryFunction)( IN HANDLE ProcessHandle, diff --git a/sandbox/win/src/sandbox_nt_util.cc b/sandbox/win/src/sandbox_nt_util.cc index 15a9cf7..cc446e5 100644 --- a/sandbox/win/src/sandbox_nt_util.cc +++ b/sandbox/win/src/sandbox_nt_util.cc @@ -385,7 +385,7 @@ bool IsValidImageSection(HANDLE section, PVOID *base, PLARGE_INTEGER offset, return false; SECTION_BASIC_INFORMATION basic_info; - ULONG bytes_returned; + SIZE_T bytes_returned; ret = g_nt.QuerySection(query_section, SectionBasicInformation, &basic_info, sizeof(basic_info), &bytes_returned); @@ -469,7 +469,7 @@ UNICODE_STRING* GetImageInfoFromModule(HMODULE module, uint32* flags) { UNICODE_STRING* GetBackingFilePath(PVOID address) { // We'll start with something close to max_path charactes for the name. - SIZE_T buffer_bytes = MAX_PATH * 2; + ULONG buffer_bytes = MAX_PATH * 2; for (;;) { MEMORY_SECTION_NAME* section_name = reinterpret_cast<MEMORY_SECTION_NAME*>( @@ -478,7 +478,7 @@ UNICODE_STRING* GetBackingFilePath(PVOID address) { if (!section_name) return NULL; - SIZE_T returned_bytes; + ULONG returned_bytes; NTSTATUS ret = g_nt.QueryVirtualMemory(NtCurrentProcess, address, MemorySectionName, section_name, buffer_bytes, &returned_bytes); |