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

Unified Diff: chrome/common/crash_keys.cc

Issue 25733002: Fix crash reporting of child process command line switches. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/crash_keys_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/crash_keys.cc
diff --git a/chrome/common/crash_keys.cc b/chrome/common/crash_keys.cc
index 0de18608c0ca775acdc8f382a8a53894b325aa53..179b1bb3281d431adf10379f9687dfef3f66c8e6 100644
--- a/chrome/common/crash_keys.cc
+++ b/chrome/common/crash_keys.cc
@@ -280,6 +280,10 @@ void SetSwitchesFromCommandLine(const CommandLine* command_line) {
if (IsBoringSwitch(switch_str))
continue;
+ // Stop if there are too many switches.
+ if (i > crash_keys::kSwitchesMaxCount)
+ break;
+
std::string key = base::StringPrintf(kSwitch, key_i++);
base::debug::SetCrashKeyValue(key, switch_str);
}
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/crash_keys_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698