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

Unified Diff: components/crash/app/breakpad_linux.cc

Issue 633833002: Breakpad Linux: Do not use std::string in a compromised context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix content shell too Created 6 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/app/chrome_crash_reporter_client.cc ('k') | components/crash/app/crash_reporter_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/crash/app/breakpad_linux.cc
diff --git a/components/crash/app/breakpad_linux.cc b/components/crash/app/breakpad_linux.cc
index 3bfd96d38c0acc9c3f372a331a510715b0f18b16..622b4bae01beac7919716228f2c56b7f5dd12553 100644
--- a/components/crash/app/breakpad_linux.cc
+++ b/components/crash/app/breakpad_linux.cc
@@ -1313,16 +1313,15 @@ void HandleCrashDump(const BreakpadInfo& info) {
MimeWriter writer(temp_file_fd, mime_boundary);
#endif
{
- // TODO(thestig) Do not use this inside a compromised context.
- std::string product_name;
- std::string version;
+ const char* product_name = "";
+ const char* version = "";
GetCrashReporterClient()->GetProductNameAndVersion(&product_name, &version);
writer.AddBoundary();
- writer.AddPairString("prod", product_name.c_str());
+ writer.AddPairString("prod", product_name);
writer.AddBoundary();
- writer.AddPairString("ver", version.c_str());
+ writer.AddPairString("ver", version);
writer.AddBoundary();
if (info.pid > 0) {
char pid_value_buf[kUint64StringSize];
« no previous file with comments | « chrome/app/chrome_crash_reporter_client.cc ('k') | components/crash/app/crash_reporter_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698