summaryrefslogtreecommitdiffstats
path: root/chrome/app/breakpad_linux.cc
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-26 21:32:20 +0000
committerthestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-26 21:32:20 +0000
commitd44051f5465679cce10a36dfbba58f9a75e27258 (patch)
treec1541bc7b429afe2e95014c60a761c576844e433 /chrome/app/breakpad_linux.cc
parentd574ef8278d12e4d810669b67da1d1871ce6fa22 (diff)
downloadchromium_src-d44051f5465679cce10a36dfbba58f9a75e27258.zip
chromium_src-d44051f5465679cce10a36dfbba58f9a75e27258.tar.gz
chromium_src-d44051f5465679cce10a36dfbba58f9a75e27258.tar.bz2
Set the buffer size correctly for 8-byte crash ids.
BUG=none TEST=crash handler should not print garbage to the console following the crash id. Review URL: http://codereview.chromium.org/115796 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16917 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/breakpad_linux.cc')
-rw-r--r--chrome/app/breakpad_linux.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/app/breakpad_linux.cc b/chrome/app/breakpad_linux.cc
index 7827231..ca1e91e 100644
--- a/chrome/app/breakpad_linux.cc
+++ b/chrome/app/breakpad_linux.cc
@@ -323,7 +323,7 @@ pid_t UploadCrashDump(const char* filename, const char* crash_url,
const pid_t child = sys_fork();
if (child) {
sys_close(fds[1]);
- char buf[32];
+ char buf[17];
HANDLE_EINTR(read(fds[0], buf, sizeof(buf) - 1));
buf[sizeof(buf) - 1] = 0;
static const char msg[] = "\nCrash dump id: ";
@@ -371,7 +371,7 @@ static bool CrashDone(const char* dump_path,
const unsigned dump_path_len = my_strlen(dump_path);
const unsigned minidump_id_len = my_strlen(minidump_id);
char *const path = reinterpret_cast<char*>(allocator.Alloc(
- dump_path_len + 1 /* '/' */ + minidump_id_len +
+ dump_path_len + 1 /* '/' */ + minidump_id_len +
4 /* ".dmp" */ + 1 /* NUL */));
memcpy(path, dump_path, dump_path_len);
path[dump_path_len] = '/';