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

Unified Diff: content/common/sandbox_win.cc

Issue 1372153002: Detecting and fixing stringprintf.h format bugs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed four mismatches that I missed 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: content/common/sandbox_win.cc
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index 5860239b4cf0b5bbfd4444569cd487fc537220ee..5b93cf5b2ae4744424e3d9b8eee43ec71f7ba305 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -224,7 +224,7 @@ void AddGenericDllEvictionPolicy(sandbox::TargetPolicy* policy) {
// Returns the object path prepended with the current logon session.
base::string16 PrependWindowsSessionPath(const base::char16* object) {
// Cache this because it can't change after process creation.
- static uintptr_t s_session_id = 0;
+ static uint64_t s_session_id = 0;
Will Harris 2015/09/29 00:29:17 This should be DWORD, since GetTokenInformation wi
brucedawson 2015/09/29 21:39:40 Done.
if (s_session_id == 0) {
HANDLE token;
DWORD session_id_length;
@@ -238,7 +238,7 @@ base::string16 PrependWindowsSessionPath(const base::char16* object) {
s_session_id = session_id;
}
- return base::StringPrintf(L"\\Sessions\\%d%ls", s_session_id, object);
+ return base::StringPrintf(L"\\Sessions\\%llu%ls", s_session_id, object);
Will Harris 2015/09/29 00:29:17 %lu seems sensible here?
brucedawson 2015/09/29 21:39:40 If s_session_id is a DWORD then %lu does seem best
}
// Checks if the sandbox should be let to run without a job object assigned.

Powered by Google App Engine
This is Rietveld 408576698