diff --git a/src/IPStackSimulator.cc b/src/IPStackSimulator.cc index b66a7d0b..0414e963 100644 --- a/src/IPStackSimulator.cc +++ b/src/IPStackSimulator.cc @@ -338,6 +338,7 @@ uint64_t IPStackSimulator::tcp_conn_key_for_client_frame(const FrameInfo& fi) { string IPStackSimulator::str_for_ipv4_netloc(uint32_t addr, uint16_t port) { be_uint32_t be_addr = addr; char addr_str[INET_ADDRSTRLEN]; + memset(addr_str, 0, sizeof(addr_str)); if (!inet_ntop(AF_INET, &be_addr, addr_str, INET_ADDRSTRLEN)) { return std::format(":{}", port); } else {