From 765e97c34765330e1f05ee1b5a9a58a43f9c8921 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Holz?= Date: Fri, 13 Aug 2021 00:28:44 +0200 Subject: [PATCH] network: initialize ip_addr in GetHostIPv4Address() --- src/core/network/network.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/network/network.cpp b/src/core/network/network.cpp index 9a4ac7e837..6571005d00 100644 --- a/src/core/network/network.cpp +++ b/src/core/network/network.cpp @@ -372,7 +372,7 @@ std::optional GetHostIPv4Address() { }); if (res != network_interfaces.end()) { - char ip_addr[16]; + char ip_addr[16] = {}; ASSERT(inet_ntop(AF_INET, &res->ip_address, ip_addr, sizeof(ip_addr)) != nullptr); LOG_INFO(Network, "IP address: {}", ip_addr);