Commit 8c8edcc7 authored by Brian Geffon's avatar Brian Geffon Committed by Commit Bot

Mojo: Fix node_channel unit test

Fix MSAN complaint about uninitialized memory.

BUG=chromium:1149805
TBR=rockot@google.com

Change-Id: Ic8956c31730e6859ce68d2da047970d4e1429693
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2548900Reviewed-by: default avatarMike West <mkwst@chromium.org>
Commit-Queue: Mike West <mkwst@chromium.org>
Auto-Submit: Brian Geffon <bgeffon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#829134}
parent 5bc48488
......@@ -102,6 +102,8 @@ TEST_F(NodeChannelTest, MessagesCannotBeSmallerThanOldestVersion) {
auto message =
std::make_unique<Channel::Message>(capacity, capacity, /*num_handles=*/0);
memset(message->mutable_payload(), 0, capacity);
// Set the type of this message as REQUEST_PORT_MERGE (6)
*reinterpret_cast<uint32_t*>(message->mutable_payload()) = 6;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment