svn commit: r299764 - head/usr.sbin/bsnmpd/tools/libbsnmptools
Garrett Cooper
ngie at FreeBSD.org
Sat May 14 21:27:35 UTC 2016
Author: ngie
Date: Sat May 14 21:27:33 2016
New Revision: 299764
URL: https://svnweb.freebsd.org/changeset/base/299764
Log:
Use the size of the destination buffer, not the source buffer.
Technically this is a no-op, but mute the clang warning in case the malloc call
above for fstring ever changes in the future
Reported by: clang
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
Modified:
head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
Modified: head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
==============================================================================
--- head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Sat May 14 20:58:34 2016 (r299763)
+++ head/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c Sat May 14 21:27:33 2016 (r299764)
@@ -264,7 +264,7 @@ add_filename(struct snmp_toolinfo *snmpt
if (cut != NULL)
asn_append_oid(&(entry->cut), cut);
- strlcpy(fstring, filename, strlen(filename) + 1);
+ strlcpy(fstring, filename, sizeof(fstring));
entry->name = fstring;
entry->done = done;
SLIST_INSERT_HEAD(&snmptoolctx->filelist, entry, link);
More information about the svn-src-head
mailing list