mirror of
https://git.freebsd.org/src.git
synced 2026-01-11 19:57:22 +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:
parent
23e69b5497
commit
60be0d71da
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue