svn commit: r294507 - head/contrib/bsnmp/snmp_mibII
Shawn Webb
shawn.webb at hardenedbsd.org
Thu Jan 21 16:55:07 UTC 2016
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
>
> 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 characters).
>
> Modified:
> head/contrib/bsnmp/snmp_mibII/mibII.c
> head/contrib/bsnmp/snmp_mibII/mibII.h
> head/contrib/bsnmp/snmp_mibII/mibII_interfaces.c
>
> Modified: head/contrib/bsnmp/snmp_mibII/mibII.c
> ==============================================================================
> --- head/contrib/bsnmp/snmp_mibII/mibII.c Thu Jan 21 15:27:44 2016 (r294506)
> +++ head/contrib/bsnmp/snmp_mibII/mibII.c Thu Jan 21 16:11:20 2016 (r294507)
> @@ -443,6 +443,7 @@ mib_fetch_ifmib(struct mibif *ifp)
> size_t len;
> void *newmib;
> struct ifmibdata oldmib = ifp->mib;
> + struct ifreq irr;
>
> if (fetch_generic_mib(ifp, &oldmib) == -1)
> return (-1);
> @@ -514,6 +515,18 @@ mib_fetch_ifmib(struct mibif *ifp)
> }
>
> 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,
--
Shawn Webb
HardenedBSD
GPG Key ID: 0x6A84658F52456EEE
GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20160121/6838acdf/attachment-0001.sig>
More information about the svn-src-all
mailing list