summaryrefslogtreecommitdiffstats
path: root/cloud_print/service/win
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-20 19:31:10 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-08-20 19:32:33 +0000
commitd4d772ea090aa8c073e93243ddee9c1258661cda (patch)
tree23f1c6fe8346074a9504f3ca7c9234fd37afab90 /cloud_print/service/win
parent069c7b15ef037351d9f5771424bb6db80e5c92e0 (diff)
downloadchromium_src-d4d772ea090aa8c073e93243ddee9c1258661cda.zip
chromium_src-d4d772ea090aa8c073e93243ddee9c1258661cda.tar.gz
chromium_src-d4d772ea090aa8c073e93243ddee9c1258661cda.tar.bz2
Don't pass const strings to CreateProcess.
The documentation says that CreateProcess() can modify its second parameter in UNICODE builds. BUG=396705 R=scottmg@chromium.org, vitalybuka@chromium.org TBR=cpu Review URL: https://codereview.chromium.org/487303004 Cr-Commit-Position: refs/heads/master@{#290890} git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290890 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print/service/win')
-rw-r--r--cloud_print/service/win/chrome_launcher.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloud_print/service/win/chrome_launcher.cc b/cloud_print/service/win/chrome_launcher.cc
index 51f1253..c00f708 100644
--- a/cloud_print/service/win/chrome_launcher.cc
+++ b/cloud_print/service/win/chrome_launcher.cc
@@ -76,8 +76,10 @@ bool LaunchProcess(const CommandLine& cmdline,
startup_info.wShowWindow = SW_SHOW;
PROCESS_INFORMATION temp_process_info = {};
+ base::FilePath::StringType writable_cmdline_str(
+ cmdline.GetCommandLineString());
if (!CreateProcess(NULL,
- const_cast<wchar_t*>(cmdline.GetCommandLineString().c_str()), NULL, NULL,
+ &writable_cmdline_str[0], NULL, NULL,
FALSE, 0, NULL, NULL, &startup_info, &temp_process_info)) {
return false;
}