The branch stable/15 has been updated by sobomax: URL: https://cgit.FreeBSD.org/src/commit/?id=222ea8bff5db75711c7459f4b794b0a40e11a463
commit 222ea8bff5db75711c7459f4b794b0a40e11a463 Author: Maxim Sobolev <[email protected]> AuthorDate: 2025-09-23 16:24:44 +0000 Commit: Maxim Sobolev <[email protected]> CommitDate: 2025-11-05 19:56:13 +0000 mksnap_ffs: fix running unded chroot Fix "run-under-chroot" workaround by replacing strlcpy(2) with memmove(2) since strings overlap. Reviewed by: arrowd Differential Revision: https://reviews.freebsd.org/D52670 (cherry picked from commit 60be0d71daab4247dc61c323777b0c593eb76975) --- sbin/mksnap_ffs/mksnap_ffs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/mksnap_ffs/mksnap_ffs.c b/sbin/mksnap_ffs/mksnap_ffs.c index 0d8e32a15ab3..58939cc69029 100644 --- a/sbin/mksnap_ffs/mksnap_ffs.c +++ b/sbin/mksnap_ffs/mksnap_ffs.c @@ -150,7 +150,7 @@ main(int argc, char **argv) errx(1, "%s: Not a mount point", stfsbuf.f_mntonname); } if (cp != stfsbuf.f_mntonname) - strlcpy(stfsbuf.f_mntonname, cp, sizeof(stfsbuf.f_mntonname)); + memmove(stfsbuf.f_mntonname, cp, strlen(cp) + 1); /* * Having verified access to the directory in which the
