summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bsnmpd
diff options
context:
space:
mode:
authorngie <ngie@FreeBSD.org>2016-05-14 21:27:33 +0000
committerngie <ngie@FreeBSD.org>2016-05-14 21:27:33 +0000
commitfc842bcc02dea1dc7fe1b1ec158cf816d7adf25b (patch)
tree4b684e3fa1553177690818f16ba1e5aa85318373 /usr.sbin/bsnmpd
parent7cc1c163268294eb7fcad6fc984ca43f3f9a0206 (diff)
downloadFreeBSD-src-fc842bcc02dea1dc7fe1b1ec158cf816d7adf25b.zip
FreeBSD-src-fc842bcc02dea1dc7fe1b1ec158cf816d7adf25b.tar.gz
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
Diffstat (limited to 'usr.sbin/bsnmpd')
-rw-r--r--usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
index 1f59f71..4ab229d 100644
--- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
+++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c
@@ -264,7 +264,7 @@ add_filename(struct snmp_toolinfo *snmptoolctx, const char *filename,
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);
OpenPOWER on IntegriCloud