summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 02:26:50 +0000
committerjschuh@chromium.org <jschuh@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-09-15 02:26:50 +0000
commit8c70345e6b806821d0a57fa1e92d38aaebd07406 (patch)
tree6f730e5042f737c0ad5b4c4c198c54ea22c86a53
parent8d32d5f98a1a84510df365e43a287d0c8f22ec82 (diff)
downloadchromium_src-8c70345e6b806821d0a57fa1e92d38aaebd07406.zip
chromium_src-8c70345e6b806821d0a57fa1e92d38aaebd07406.tar.gz
chromium_src-8c70345e6b806821d0a57fa1e92d38aaebd07406.tar.bz2
Prevent implicit local string from getting deleted.
BUG=90259 TEST=None Review URL: http://codereview.chromium.org/7892024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@101229 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--content/common/sandbox_policy.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/content/common/sandbox_policy.cc b/content/common/sandbox_policy.cc
index ad48a2a..f42d7f6 100644
--- a/content/common/sandbox_policy.cc
+++ b/content/common/sandbox_policy.cc
@@ -239,10 +239,11 @@ string16 PrependWindowsSessionPath(const char16* object) {
// Closes handles that are opened at process creation and initialization.
void AddBaseHandleClosePolicy(sandbox::TargetPolicy* policy) {
// Being able to manipulate anything BaseNamedObjects is bad.
- policy->AddKernelObjectToClose(L"Directory", PrependWindowsSessionPath(
- L"\\BaseNamedObjects").data());
- policy->AddKernelObjectToClose(L"Section", PrependWindowsSessionPath(
- L"\\BaseNamedObjects\\windows_shell_global_counters").data());
+ string16 object_path = PrependWindowsSessionPath(L"\\BaseNamedObjects");
+ policy->AddKernelObjectToClose(L"Directory", object_path.data());
+ object_path = PrependWindowsSessionPath(
+ L"\\BaseNamedObjects\\windows_shell_global_counters");
+ policy->AddKernelObjectToClose(L"Section", object_path.data());
}
// Adds the generic policy rules to a sandbox TargetPolicy.