Index: content/common/sandbox_win.cc |
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc |
index 88f703cef3388f99df46ec9f4a951c33c4793fc1..d9b031e36804758abbaa4dcdc39c349d8f800f68 100644 |
--- a/content/common/sandbox_win.cc |
+++ b/content/common/sandbox_win.cc |
@@ -747,8 +747,12 @@ base::Process StartSandboxedProcess( |
if (direct_write_font_cache_section.Open(name, true)) { |
void* shared_handle = policy->AddHandleToShare( |
direct_write_font_cache_section.handle().GetHandle()); |
- cmd_line->AppendSwitchASCII(switches::kFontCacheSharedHandle, |
- base::UintToString(reinterpret_cast<unsigned int>(shared_handle))); |
+ // Cast through uintptr_t and then unsigned int to make the truncation |
+ // explicit. Handles are size-of-pointer but are always 32-bit values. |
+ cmd_line->AppendSwitchASCII( |
+ switches::kFontCacheSharedHandle, |
+ base::UintToString(static_cast<unsigned int>( |
+ reinterpret_cast<uintptr_t>(shared_handle)))); |
} |
} |
} |