Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: chrome/browser/renderer_host/render_crash_handler_host_linux.cc

Issue 213038: Fix an off by 1 error in the Linux Breakpad guid.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/app/breakpad_linux.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_host/render_crash_handler_host_linux.h" 5 #include "chrome/browser/renderer_host/render_crash_handler_host_linux.h"
6 6
7 #include <dirent.h> 7 #include <dirent.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string.h> 9 #include <string.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 memset(&msg, 0, sizeof(msg)); 328 memset(&msg, 0, sizeof(msg));
329 struct iovec done_iov; 329 struct iovec done_iov;
330 done_iov.iov_base = const_cast<char*>("\x42"); 330 done_iov.iov_base = const_cast<char*>("\x42");
331 done_iov.iov_len = 1; 331 done_iov.iov_len = 1;
332 msg.msg_iov = &done_iov; 332 msg.msg_iov = &done_iov;
333 msg.msg_iovlen = 1; 333 msg.msg_iovlen = 1;
334 334
335 HANDLE_EINTR(sendmsg(signal_fd, &msg, MSG_DONTWAIT | MSG_NOSIGNAL)); 335 HANDLE_EINTR(sendmsg(signal_fd, &msg, MSG_DONTWAIT | MSG_NOSIGNAL));
336 HANDLE_EINTR(close(signal_fd)); 336 HANDLE_EINTR(close(signal_fd));
337 337
338 // Sanitize the string data a bit more
339 guid[kGuidSize] = crash_url[kMaxActiveURLSize] = distro[kDistroSize] = 0;
340
338 BreakpadInfo info; 341 BreakpadInfo info;
339 info.filename = minidump_filename.c_str(); 342 info.filename = minidump_filename.c_str();
340 info.process_type = "renderer"; 343 info.process_type = "renderer";
341 info.process_type_length = 8; 344 info.process_type_length = 8;
342 info.crash_url = crash_url; 345 info.crash_url = crash_url;
343 info.crash_url_length = strlen(crash_url); 346 info.crash_url_length = strlen(crash_url);
344 info.guid = guid; 347 info.guid = guid;
345 info.guid_length = strlen(guid); 348 info.guid_length = strlen(guid);
346 info.distro = distro; 349 info.distro = distro;
347 info.distro_length = strlen(distro); 350 info.distro_length = strlen(distro);
348 info.upload = upload; 351 info.upload = upload;
349 HandleCrashDump(info); 352 HandleCrashDump(info);
350 } 353 }
351 354
352 void RenderCrashHandlerHostLinux::WillDestroyCurrentMessageLoop() { 355 void RenderCrashHandlerHostLinux::WillDestroyCurrentMessageLoop() {
353 file_descriptor_watcher_.StopWatchingFileDescriptor(); 356 file_descriptor_watcher_.StopWatchingFileDescriptor();
354 } 357 }
OLDNEW
« no previous file with comments | « chrome/app/breakpad_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698