From owner-svn-src-all@FreeBSD.ORG Fri Sep 7 08:58:31 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9F231106564A; Fri, 7 Sep 2012 08:58:31 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88BAE8FC0A; Fri, 7 Sep 2012 08:58:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q878wVVc070293; Fri, 7 Sep 2012 08:58:31 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q878wVf2070291; Fri, 7 Sep 2012 08:58:31 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201209070858.q878wVf2070291@svn.freebsd.org> From: Kevin Lo Date: Fri, 7 Sep 2012 08:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240191 - head/contrib/bsnmp/snmpd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Sep 2012 08:58:31 -0000 Author: kevlo Date: Fri Sep 7 08:58:30 2012 New Revision: 240191 URL: http://svn.freebsd.org/changeset/base/240191 Log: Fully initialize the stack-allocated "struct sockaddr_in sa" structure. Modified: head/contrib/bsnmp/snmpd/trap.c Modified: head/contrib/bsnmp/snmpd/trap.c ============================================================================== --- head/contrib/bsnmp/snmpd/trap.c Fri Sep 7 08:18:06 2012 (r240190) +++ head/contrib/bsnmp/snmpd/trap.c Fri Sep 7 08:58:30 2012 (r240191) @@ -117,7 +117,7 @@ trapsink_create(struct trapsink_dep *tde return (SNMP_ERR_RES_UNAVAIL); } (void)shutdown(t->socket, SHUT_RD); - + memset(&sa, 0, sizeof(sa)); sa.sin_len = sizeof(sa); sa.sin_family = AF_INET; sa.sin_addr.s_addr = htonl((t->index.subs[0] << 24) | @@ -725,6 +725,7 @@ target_activate_address(struct target_ad } (void)shutdown(addrs->socket, SHUT_RD); + memset(&sa, 0, sizeof(sa)); sa.sin_len = sizeof(sa); sa.sin_family = AF_INET;