From: Pieter Lexis Date: Thu, 18 Jan 2018 12:52:50 +0000 (+0100) Subject: ixfrdist: initialize fromlen X-Git-Tag: dnsdist-1.3.0~111^2~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8be49a38b6c101308b25e1297b296095c8293850;p=pdns ixfrdist: initialize fromlen --- diff --git a/pdns/ixfrdist.cc b/pdns/ixfrdist.cc index 887fb34dd..00242e2b6 100644 --- a/pdns/ixfrdist.cc +++ b/pdns/ixfrdist.cc @@ -294,7 +294,7 @@ void handleUDPRequest(int fd, boost::any&) { // TODO make the buffer-size configurable char buf[4096]; ComboAddress saddr; - socklen_t fromlen; + socklen_t fromlen = sizeof(saddr); int res = recvfrom(fd, buf, sizeof(buf), 0, (struct sockaddr*) &saddr, &fromlen); if (res == 0) { @@ -329,7 +329,7 @@ void handleUDPRequest(int fd, boost::any&) { void handleTCPRequest(int fd, boost::any&) { ComboAddress saddr; - socklen_t socklen; + socklen_t socklen = sizeof(saddr); int cfd = accept(fd, (sockaddr*) &saddr, &socklen);