Fix up both r299764 and r299770
authorngie <ngie@FreeBSD.org>
Sun, 15 May 2016 00:01:23 +0000 (00:01 +0000)
committerngie <ngie@FreeBSD.org>
Sun, 15 May 2016 00:01:23 +0000 (00:01 +0000)
commitb525fce336667f88a6a3d25089de1964d25f65cb
tree0a7989545f350ab47e4e9da4de3eac67ade1c2e8
parent968a458f039a54c9a46966ccbc693f7a7ce70e1f
Fix up both r299764 and r299770

nitems was wrong too, as it was being tested against a pointer instead of a buffer on
the stack.

Since the old code was just doing malloc, then strlcpy'ing the contents of the source
buffer into the destination buffer, replace it all with a call to strdup..

Reported by: bde
MFC after: 1 week
X-MFC with: r299764, r299770
Supersized Duncecap to: ngie
Sponsored by: EMC / Isilon Storage Division
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c