diff options
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"; |