Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(split): message header should not be empty (XiaoMi#725)
Browse files Browse the repository at this point in the history
hycdong authored and zhangyifan27 committed Jan 26, 2021

Verified

This commit was signed with the committer’s verified signature.
gsmet Guillaume Smet
1 parent 4d7404b commit 4e4a1ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/rpc/rpc_message.cpp
Original file line number Diff line number Diff line change
@@ -181,7 +181,7 @@ message_ex *message_ex::copy_message_no_reply(const message_ex &old_msg)
static_cast<char *>(dsn::tls_trans_malloc(sizeof(message_header))),
[](char *c) { dsn::tls_trans_free(c); });
msg->header = reinterpret_cast<message_header *>(header_holder.get());
msg->header = {}; // initialize to empty struct
memset(static_cast<void *>(msg->header), 0, sizeof(message_header));
msg->buffers.emplace_back(blob(std::move(header_holder), sizeof(message_header)));

if (old_msg.buffers.size() == 1) {

0 comments on commit 4e4a1ab

Please sign in to comment.