summaryrefslogtreecommitdiffstats
path: root/chrome/app
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-03 23:33:27 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-03 23:33:27 +0000
commitd8f2e971f453994cbdb6e91a0a440e3d342de3fb (patch)
tree3d2d3dcbffd0918fa64c73a95a6639de8e566e5c /chrome/app
parent70d9dc920b83a200fb15c4a7e8e3ed8d70d4f2a1 (diff)
downloadchromium_src-d8f2e971f453994cbdb6e91a0a440e3d342de3fb.zip
chromium_src-d8f2e971f453994cbdb6e91a0a440e3d342de3fb.tar.gz
chromium_src-d8f2e971f453994cbdb6e91a0a440e3d342de3fb.tar.bz2
Linux: Fix an unterminated string read in crash reporting.
BUG=130824 TEST=none Review URL: https://chromiumcodereview.appspot.com/10497003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@140251 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app')
-rw-r--r--chrome/app/breakpad_linuxish.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/app/breakpad_linuxish.cc b/chrome/app/breakpad_linuxish.cc
index 19f1d2d..c6decb5 100644
--- a/chrome/app/breakpad_linuxish.cc
+++ b/chrome/app/breakpad_linuxish.cc
@@ -553,10 +553,12 @@ void HandleCrashDump(const BreakpadInfo& info) {
writer.AddPairString("guid", info.guid);
writer.AddBoundary();
if (info.pid > 0) {
- char pid_buf[kUint64StringSize];
- uint64_t pid_str_len = my_uint64_len(info.pid);
- my_uint64tos(pid_buf, info.pid, pid_str_len);
- writer.AddPairString("pid", pid_buf);
+ char pid_value_buf[kUint64StringSize];
+ uint64_t pid_value_len = my_uint64_len(info.pid);
+ my_uint64tos(pid_value_buf, info.pid, pid_value_len);
+ static const char pid_key_name[] = "pid";
+ writer.AddPairData(pid_key_name, sizeof(pid_key_name) - 1,
+ pid_value_buf, pid_value_len);
writer.AddBoundary();
}
#if defined(OS_ANDROID)