Skip to content

Commit

Permalink
ipc: Initialize a struct member passed to mach_msg().
Browse files Browse the repository at this point in the history
Failure to do so upsets valgrind.

BUG=535711
TBR=mark@chromium.org

Review URL: https://codereview.chromium.org/1386303002

Cr-Commit-Position: refs/heads/master@{#352708}
  • Loading branch information
erikchen authored and Commit bot committed Oct 6, 2015
1 parent 53cb767 commit c4c7668
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ipc/attachment_broker_privileged_mac_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ void SendUInt32(mach_port_t port, uint32_t message) {
header->msgh_local_port = MACH_PORT_NULL;
header->msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0);
header->msgh_reserved = 0;
header->msgh_id = 0;
header->msgh_size = total_size;
memcpy(static_cast<char*>(buffer) + sizeof(mach_msg_header_t), &message,
message_size);
Expand Down

0 comments on commit c4c7668

Please sign in to comment.