Fix up r299764

I meant to use nitems, not sizeof(..) with the destination buffer. Using sizeof(..)
on a pointer will always truncate the output in the destination buffer incorrectly

Pointyhat to: ngie
MFC after: 1 week
X-MFC with: r299764
Sponsored by: EMC / Isilon Storage Division
This commit is contained in:
Enji Cooper 2016-05-14 22:43:07 +00:00
parent 896f12fec1
commit 54811dda50

View File

@ -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, sizeof(fstring));
strlcpy(fstring, filename, nitems(fstring));
entry->name = fstring;
entry->done = done;
SLIST_INSERT_HEAD(&snmptoolctx->filelist, entry, link);