zfs/lib/libshare
Richard Yao ab672133a9
Give strlcat() full buffer lengths rather than smaller buffer lengths
strlcat() is supposed to be given the length of the destination buffer,
including the existing contents. Unfortunately, I had been overzealous
when I wrote a51288aabb, since I gave it
the length of the destination buffer, minus the existing contents. This
likely caused a regression on large strings.

On the topic of being overzealous, the use of strlcat() in
dmu_send_estimate_fast() was unnecessary because recv_clone_name is a
fixed length string. We continue using strlcat() mostly as defensive
programming, in case the string length is ever changed, even though it
is unnecessary.

Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14476
2023-02-14 11:03:42 -08:00
..
os Fix oversights from 4170ae4e 2022-10-31 10:01:04 -07:00
Makefile.am autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00
libshare.c Make zfs-share service resilient to stale exports 2022-09-09 10:54:16 -07:00
libshare_impl.h Make zfs-share service resilient to stale exports 2022-09-09 10:54:16 -07:00
nfs.c Give strlcat() full buffer lengths rather than smaller buffer lengths 2023-02-14 11:03:42 -08:00
nfs.h Make zfs-share service resilient to stale exports 2022-09-09 10:54:16 -07:00
smb.h Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00