Skip to content

Commit

Permalink
LibIPC: Pass only message size to decoder
Browse files Browse the repository at this point in the history
  • Loading branch information
guerinoni authored and awesomekling committed Aug 11, 2021
1 parent df14d11 commit b2a8499
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Libraries/LibIPC/Connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ class Connection : public Core::Object {
if (message_size == 0 || bytes.size() - index - sizeof(uint32_t) < message_size)
break;
index += sizeof(message_size);
auto remaining_bytes = ReadonlyBytes { bytes.data() + index, bytes.size() - index };
auto remaining_bytes = ReadonlyBytes { bytes.data() + index, message_size };
if (auto message = LocalEndpoint::decode_message(remaining_bytes, m_socket->fd())) {
m_unprocessed_messages.append(message.release_nonnull());
} else if (auto message = PeerEndpoint::decode_message(remaining_bytes, m_socket->fd())) {
Expand Down

0 comments on commit b2a8499

Please sign in to comment.