Date: Fri, 7 Sep 2012 08:58:31 +0000 (UTC) From: Kevin Lo <kevlo@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r240191 - head/contrib/bsnmp/snmpd Message-ID: <201209070858.q878wVf2070291@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201209070858.q878wVf2070291>