From a1a0e675318da89f2b13eb65a1f8cab601123bf9 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 26 Jul 2012 10:38:29 -0400 Subject: [PATCH] memset sockaddr_in before using it. Found by coverity. --- evdns.c | 1 + 1 file changed, 1 insertion(+) diff --git a/evdns.c b/evdns.c index 416137ba..d648c936 100644 --- a/evdns.c +++ b/evdns.c @@ -2529,6 +2529,7 @@ evdns_base_nameserver_add(struct evdns_base *base, unsigned long int address) { struct sockaddr_in sin; int res; + memset(&sin, 0, sizeof(sin)); sin.sin_addr.s_addr = address; sin.sin_port = htons(53); sin.sin_family = AF_INET; -- 2.40.0