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

Unified Diff: sandbox/win/src/sandbox_nt_util.cc

Issue 1328703003: Correct PROCESS_BASIC_INFORMATION for 64 bit Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: sandbox/win/src/sandbox_nt_util.cc
diff --git a/sandbox/win/src/sandbox_nt_util.cc b/sandbox/win/src/sandbox_nt_util.cc
index 64fd1f1f6d7f2c173b39d476925b2c1e3a90da6a..8237c4412521f0633b073aa3722916e99f6466bd 100644
--- a/sandbox/win/src/sandbox_nt_util.cc
+++ b/sandbox/win/src/sandbox_nt_util.cc
@@ -337,7 +337,7 @@ NTSTATUS AllocAndCopyName(const OBJECT_ATTRIBUTES* in_object,
return ret;
}
-NTSTATUS GetProcessId(HANDLE process, ULONG *process_id) {
+NTSTATUS GetProcessId(HANDLE process, DWORD *process_id) {
PROCESS_BASIC_INFORMATION proc_info;
ULONG bytes_returned;
@@ -347,7 +347,7 @@ NTSTATUS GetProcessId(HANDLE process, ULONG *process_id) {
if (!NT_SUCCESS(ret) || sizeof(proc_info) != bytes_returned)
return ret;
- *process_id = proc_info.UniqueProcessId;
+ *process_id = static_cast<DWORD>(proc_info.UniqueProcessId);
return STATUS_SUCCESS;
}
@@ -355,7 +355,7 @@ bool IsSameProcess(HANDLE process) {
if (NtCurrentProcess == process)
return true;
- static ULONG s_process_id = 0;
+ static DWORD s_process_id = 0;
if (!s_process_id) {
NTSTATUS ret = GetProcessId(NtCurrentProcess, &s_process_id);
@@ -363,7 +363,7 @@ bool IsSameProcess(HANDLE process) {
return false;
}
- ULONG process_id;
+ DWORD process_id;
NTSTATUS ret = GetProcessId(process, &process_id);
if (!NT_SUCCESS(ret))
return false;

Powered by Google App Engine
This is Rietveld 408576698