mirror of
https://git.FreeBSD.org/src.git
synced 2026-06-02 11:24:32 +00:00
mksnap_ffs: fix running unded chroot
Fix "run-under-chroot" workaround by replacing strlcpy(2) with memmove(2) since strings overlap. MFC after: 1 week Reviewed by: arrowd Differential Revision: https://reviews.freebsd.org/D52670
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user