Date: Thu, 21 Jan 2016 11:55:01 -0500 From: Shawn Webb <shawn.webb@hardenedbsd.org> To: Hartmut Brandt <harti@FreeBSD.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r294507 - head/contrib/bsnmp/snmp_mibII Message-ID: <20160121165501.GA88070@mutt-hardenedbsd> In-Reply-To: <201601211611.u0LGBKkV086754@repo.freebsd.org> References: <201601211611.u0LGBKkV086754@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--YiEDa0DAkWCtVeE4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 21, 2016 at 04:11:20PM +0000, Hartmut Brandt wrote: > Author: harti > Date: Thu Jan 21 16:11:20 2016 > New Revision: 294507 > URL: https://svnweb.freebsd.org/changeset/base/294507 >=20 > Log: > Fill the ifAlias leaf of the ifXTable with the interface description > if there is one available and it fits into the maximum size (64 charact= ers). >=20 > Modified: > head/contrib/bsnmp/snmp_mibII/mibII.c > head/contrib/bsnmp/snmp_mibII/mibII.h > head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c >=20 > Modified: head/contrib/bsnmp/snmp_mibII/mibII.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/contrib/bsnmp/snmp_mibII/mibII.c Thu Jan 21 15:27:44 2016 (r2945= 06) > +++ head/contrib/bsnmp/snmp_mibII/mibII.c Thu Jan 21 16:11:20 2016 (r2945= 07) > @@ -443,6 +443,7 @@ mib_fetch_ifmib(struct mibif *ifp) > size_t len; > void *newmib; > struct ifmibdata oldmib =3D ifp->mib; > + struct ifreq irr; > =20 > if (fetch_generic_mib(ifp, &oldmib) =3D=3D -1) > return (-1); > @@ -514,6 +515,18 @@ mib_fetch_ifmib(struct mibif *ifp) > } > =20 > out: > + strncpy(irr.ifr_name, ifp->name, sizeof(irr.ifr_name)); Why not strlcpy? You're not forcing null termination here, so there could be issues. Thanks, --=20 Shawn Webb HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE --YiEDa0DAkWCtVeE4 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWoQ1iAAoJEGqEZY9SRW7uQBoQAKhhmF/Z4L/pgC+g5DPPvPoB Caw35GG1avNuty0mwGXK7ASHKCj8BbN+e80XKSYNlB11ZutfnRU4q6IJNs0wWit/ dFzrlqeFSLluKf6o+RvMymE0SXNZg9FiYScckRJy69NuDnJm+1o7xtlKpegPi5yu 799cL/9kxWnj1VfbJHzHuCVHR13+rjEAXquRd4kJe+vREPpYm2bvFOQJXIy1ABVl otua4E1UqCQ1ZZNJ14daWv6H9+YMF5RjIRCk1BGAf7PctoD2EMPJfcQOrpg4kxB7 WoDCrAGtcaSqAfVOtyMnb/5M5tz67aCFg7iQ+apPegcspkAiyyTrOUjHtNw9dEnk 2Q4L88+rBDFZjPe3HYkB6a4+CXo6wTiRtwqEL4epE39Idt5mqih5LuprkrwVNV4A RMz6v0yVtAAyig/sItvou5b0pRcmhYqbmqAy7VnQ5hNpEF9URwi9XoazfScrLGLI q+GUNl38klRGamSKoOhPlCjunLbM/2EUpQo6S9kar7q7MiCdWVsD1kO2DvBA1SMN OHO0m0lMiajWBlsi3+YFJbQ/9yZ17uXkLDL2PtE4SgWAqWW4z93i/5PXZd0R6vdn wJut8wZtu9oGiEQkqKm/+c16NBqc446IK4IEKN5Ux8rK9SlOTpKi0MAVAFhtcHfw InaSB6g5uzGQZNt27JXq =ogKw -----END PGP SIGNATURE----- --YiEDa0DAkWCtVeE4--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160121165501.GA88070>