From d5f4a8b76200c4b26257e7ce566ea5cabb31bc4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Wed, 22 Feb 2017 18:48:58 +0000 Subject: [PATCH] fixed not initialized struct addrinfo --- lib/network.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/network.cpp b/lib/network.cpp index 0a291ff28..d573e9144 100644 --- a/lib/network.cpp +++ b/lib/network.cpp @@ -7,6 +7,7 @@ int listen_on_port(char *ip, uint16_t port, int backlog, bool reuseport) { int rc, arg_on = 1; struct addrinfo hints; + memset(&hints,0,sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM;