Chromium Code Reviews| 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 " |