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

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

Issue 649443002: Breakpad Linux: Fix flag value delimiter for ChromeOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix use of my_strlcat 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 | « no previous file | no next file » | 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 622b4bae01beac7919716228f2c56b7f5dd12553..a1459c9e2752cd976f41d1612a4a62ce3673c894 100644
--- a/components/crash/app/breakpad_linux.cc
+++ b/components/crash/app/breakpad_linux.cc
@@ -970,16 +970,37 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
uint64_t uid_str_length = my_uint64_len(uid);
my_uint64tos(uid_buf, uid, uid_str_length);
uid_buf[uid_str_length] = '\0';
+
+ size_t buf_len = my_strlen(dumpfile) + 10;
vapier 2014/10/13 22:37:55 alternative: const char kChromeFlag[] = "--chrom
stevefung 2014/10/13 23:51:54 Done.
+ char* chrome_flag = reinterpret_cast<char*>(allocator->Alloc(buf_len));
+ chrome_flag[0] = '\0';
+ my_strlcat(chrome_flag, "--chrome=", buf_len);
+ my_strlcat(chrome_flag, dumpfile, buf_len);
+
+ buf_len = my_strlen(pid_buf) + 7;
+ char* pid_flag = reinterpret_cast<char*>(allocator->Alloc(buf_len));
+ pid_flag[0] = '\0';
+ my_strlcat(pid_flag, "--pid=", buf_len);
+ my_strlcat(pid_flag, pid_buf, buf_len);
+
+ buf_len = my_strlen(uid_buf) + 7;
+ char* uid_flag = reinterpret_cast<char*>(allocator->Alloc(buf_len));
+ uid_flag[0] = '\0';
+ my_strlcat(uid_flag, "--uid=", buf_len);
+ my_strlcat(uid_flag, uid_buf, buf_len);
+
+ buf_len = my_strlen(exe_buf) + 7;
+ char* exe_flag = reinterpret_cast<char*>(allocator->Alloc(buf_len));
+ exe_flag[0] = '\0';
+ my_strlcat(exe_flag, "--exe=", buf_len);
+ my_strlcat(exe_flag, exe_buf, buf_len);
+
const char* args[] = {
kCrashReporterBinary,
- "--chrome",
- dumpfile,
- "--pid",
- pid_buf,
- "--uid",
- uid_buf,
- "--exe",
- exe_buf,
+ chrome_flag,
+ pid_flag,
+ uid_flag,
+ exe_flag,
NULL,
};
static const char msg[] = "Cannot upload crash dump: cannot exec "
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698