diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-23 21:27:43 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-23 21:27:43 +0000 |
commit | 9ddbcd95dd5c1e38a3b38cfc0c8c913a7610a8b9 (patch) | |
tree | 3d6f5a9b005c5707f736e0d9bf8497cdb55951f4 /chrome | |
parent | 2e102efa6aee73d64c7242ec08be00fc68a3dbf7 (diff) | |
download | chromium_src-9ddbcd95dd5c1e38a3b38cfc0c8c913a7610a8b9.zip chromium_src-9ddbcd95dd5c1e38a3b38cfc0c8c913a7610a8b9.tar.gz chromium_src-9ddbcd95dd5c1e38a3b38cfc0c8c913a7610a8b9.tar.bz2 |
Fix an off by 1 error in the Linux Breakpad guid.
BUG=22067
TEST=No more random strings in crash client GUIDs.
Review URL: http://codereview.chromium.org/213038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26991 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/breakpad_linux.cc | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_crash_handler_host_linux.cc | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/chrome/app/breakpad_linux.cc b/chrome/app/breakpad_linux.cc index 415db89..a9c11d7 100644 --- a/chrome/app/breakpad_linux.cc +++ b/chrome/app/breakpad_linux.cc @@ -576,7 +576,7 @@ RendererCrashHandler(const void* crash_context, size_t crash_context_size, const int fd = reinterpret_cast<intptr_t>(context); int fds[2]; socketpair(AF_UNIX, SOCK_STREAM, 0, fds); - char guid[kGuidSize] = {0}; + char guid[kGuidSize + 1] = {0}; char crash_url[kMaxActiveURLSize + 1] = {0}; char distro[kDistroSize + 1] = {0}; const size_t guid_len = std::min(google_update::linux_guid.size(), diff --git a/chrome/browser/renderer_host/render_crash_handler_host_linux.cc b/chrome/browser/renderer_host/render_crash_handler_host_linux.cc index ec83663..4e9fdf9 100644 --- a/chrome/browser/renderer_host/render_crash_handler_host_linux.cc +++ b/chrome/browser/renderer_host/render_crash_handler_host_linux.cc @@ -335,6 +335,9 @@ void RenderCrashHandlerHostLinux::OnFileCanReadWithoutBlocking(int fd) { HANDLE_EINTR(sendmsg(signal_fd, &msg, MSG_DONTWAIT | MSG_NOSIGNAL)); HANDLE_EINTR(close(signal_fd)); + // Sanitize the string data a bit more + guid[kGuidSize] = crash_url[kMaxActiveURLSize] = distro[kDistroSize] = 0; + BreakpadInfo info; info.filename = minidump_filename.c_str(); info.process_type = "renderer"; |