mirror_zfs/lib/libzfs
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
.gitignore
libzfs_changelist.c
libzfs_config.c
libzfs_crypto.c
libzfs_dataset.c
libzfs_diff.c
libzfs_impl.h
libzfs_import.c
libzfs_iter.c
libzfs_mount.c Fix variable shadowing in libzfs_mount 2023-02-02 15:22:12 -08:00
libzfs_pool.c Configure zed's diagnosis engine with vdev properties 2023-01-23 13:14:25 -08:00
libzfs_sendrecv.c Give strlcat() full buffer lengths rather than smaller buffer lengths 2023-02-14 11:03:42 -08:00
libzfs_status.c
libzfs_util.c Configure zed's diagnosis engine with vdev properties 2023-01-23 13:14:25 -08:00
libzfs.abi Configure zed's diagnosis engine with vdev properties 2023-01-23 13:14:25 -08:00
libzfs.pc.in
libzfs.suppr
Makefile.am
THIRDPARTYLICENSE.openssl
THIRDPARTYLICENSE.openssl.descrip