diff --git a/toxcore/TCP_client.h b/toxcore/TCP_client.h index 8a698869..90002214 100644 --- a/toxcore/TCP_client.h +++ b/toxcore/TCP_client.h @@ -58,7 +58,7 @@ enum { }; typedef struct { uint8_t status; - Socket sock; + Socket sock; #ifdef HAVE_LIBEV struct { ev_io listener; diff --git a/toxcore/network.c b/toxcore/network.c index f74363e6..a68e91f4 100644 --- a/toxcore/network.c +++ b/toxcore/network.c @@ -674,6 +674,8 @@ Networking_Core *new_networking_ex(Logger *log, IP ip, uint16_t port_from, uint1 struct sockaddr_storage addr; size_t addrsize; + memset(&addr, 0, sizeof(struct sockaddr_storage)); + if (temp->family == AF_INET) { struct sockaddr_in *addr4 = (struct sockaddr_in *)&addr;