From 0ce68b994e4c7f46fe08b5cd1b8493c97eb5654f Mon Sep 17 00:00:00 2001 From: xor2003 Date: Fri, 17 Oct 2014 16:15:22 +0400 Subject: [PATCH] Initialise source.port to prevent garbage value --- toxcore/TCP_server.c | 1 + 1 file changed, 1 insertion(+) diff --git a/toxcore/TCP_server.c b/toxcore/TCP_server.c index 5dae1262..c7bccab7 100644 --- a/toxcore/TCP_server.c +++ b/toxcore/TCP_server.c @@ -805,6 +805,7 @@ static int handle_TCP_packet(TCP_Server *TCP_server, uint32_t con_id, const uint return -1; IP_Port source; + source.port = 0; // dummy initialise source.ip.family = TCP_ONION_FAMILY; source.ip.ip6.uint32[0] = con_id; source.ip.ip6.uint64[1] = con->identifier;