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

Unified Diff: remoting/host/ipc_util_win.cc

Issue 902643002: Revert "Enable positional parameters for base::vsnprintf and base::vswprintf on Windows." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extension Created 5 years, 10 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: remoting/host/ipc_util_win.cc
diff --git a/remoting/host/ipc_util_win.cc b/remoting/host/ipc_util_win.cc
index dbc5c54eb84d120a0970a7bbc6641eb90e85bff3..22ac15a0ea8472740df023c2e709331857f1e41c 100644
--- a/remoting/host/ipc_util_win.cc
+++ b/remoting/host/ipc_util_win.cc
@@ -39,8 +39,10 @@ bool CreateConnectedIpcChannel(
// between CreateNamedPipe() and CreateFile() calls before it will be passed
// to the network process. It gives full access to the account that
// the calling code is running under and denies access by anyone else.
- std::string security_descriptor = base::StringPrintf(
- "O:%1$sG:%1$sD:(A;;GA;;;%1$s)", base::WideToUTF8(user_sid).c_str());
+ std::string user_sid_utf8 = base::WideToUTF8(user_sid);
+ std::string security_descriptor =
+ base::StringPrintf("O:%sG:%sD:(A;;GA;;;%s)", user_sid_utf8.c_str(),
+ user_sid_utf8.c_str(), user_sid_utf8.c_str());
// Generate a unique name for the channel.
std::string channel_name = IPC::Channel::GenerateUniqueRandomChannelID();

Powered by Google App Engine
This is Rietveld 408576698