diff options
author | rickyz <rickyz@chromium.org> | 2014-11-11 17:33:23 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-12 01:33:44 +0000 |
commit | 71cbda10ac121e51331f366c2128d8dec4fcc923 (patch) | |
tree | 333743c8596c409de1d4f2944631865468e38b91 /ipc | |
parent | 32474d8dbdf65bcc0b62865583cb5a3ea0bc7ca4 (diff) | |
download | chromium_src-71cbda10ac121e51331f366c2128d8dec4fcc923.zip chromium_src-71cbda10ac121e51331f366c2128d8dec4fcc923.tar.gz chromium_src-71cbda10ac121e51331f366c2128d8dec4fcc923.tar.bz2 |
Fix signed integer overflow in GetRefNumUpper24.
Review URL: https://codereview.chromium.org/717793005
Cr-Commit-Position: refs/heads/master@{#303777}
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/ipc_message.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc/ipc_message.cc b/ipc/ipc_message.cc index 7bd7a69..82b136ac 100644 --- a/ipc/ipc_message.cc +++ b/ipc/ipc_message.cc @@ -22,8 +22,8 @@ base::StaticAtomicSequenceNumber g_ref_num; // 8 bits set to 0 for use as flags. inline uint32 GetRefNumUpper24() { base::debug::TraceLog* trace_log = base::debug::TraceLog::GetInstance(); - int32 pid = trace_log ? trace_log->process_id() : 0; - int32 count = g_ref_num.GetNext(); + uint32 pid = trace_log ? trace_log->process_id() : 0; + uint32 count = g_ref_num.GetNext(); // The 24 bit hash is composed of 14 bits of the count and 10 bits of the // Process ID. With the current trace event buffer cap, the 14-bit count did // not appear to wrap during a trace. Note that it is not a big deal if |