Use strlcpy().  There should be no functional change.
The issue will be hit when a file has more than 2 variable-length SA
and the total SA size is larger than the bonus buffer's
length -  sizeof (blkptr_t), but less the bonus buffer's length.

In sa_find_sizes(), 'done' is set to TRUE if the SA size + header > the
bonus buffer's length - sizeof (blkptr_t), then hdrsize += sizeof(uint16_t)
will be skipped for the second variable-length SA.  If finally all SA can
fit in the bonus buffer and no spill block is needed, we will get a wrong
hdrsize.

Reproduction case:

touch 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890
ln -s 123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 file
setfacl -h -m u:root:rwx:allow,g:wheel:rwx:allow file

would trigger an assertion in zdb -vvv:

Assertion failed: (IS_SA_BONUSTYPE(bonustype) && SA_HDR_SIZE_MATCH_LAYOUT(hdr, tb) || !IS_SA_BONUSTYPE(bonustype) || (IS_SA_BONUSTYPE(bonustype) && hdr->sa_layout_info == 0)), file /usr/src/cddl/lib/libzpool/../../../sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c, line 1509.

Submitted by:	James Pan <jiaming.pan@yahoo.com>