Skip to content

Commit

Permalink
fix: uninitialized memory
Browse files Browse the repository at this point in the history
  • Loading branch information
DoubleCouponDay committed Feb 6, 2022
1 parent 11e3a88 commit 30153ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ std::vector<char> Protocol::receive_bytes(SOCKET handle, raw_name_data& expected
if (expected_endpoint.initialized == false){
expected_endpoint.name_len = sizeof(raw_name_data);
}
sockaddr addr;
auto addr = sockaddr{};
socklen_t addr_len = sizeof(sockaddr_in);
std::vector<char> data(500, (char)0, std::allocator<char>());
int result = ::recvfrom(handle, data.data(), (int)data.size(), 0, &addr, &addr_len);
Expand Down

0 comments on commit 30153ab

Please sign in to comment.