mirror of https://github.com/ericonr/dotfiles.git
enter-chroot: use strlcat instead of strncat.
This assumes running environment is musl. Mistake pointed out by duncaen.
This commit is contained in:
parent
937e1b8e82
commit
18cbf06cd4
|
@ -67,7 +67,7 @@ int main(int argc, char * const argv[])
|
|||
int chrooted_rv = 0;
|
||||
struct stat chrooted_stat = {0};
|
||||
strncpy(chrooted, mntpoint, PATH_MAX);
|
||||
strncat(chrooted, "/chrooted", PATH_MAX - 1);
|
||||
strlcat(chrooted, "/chrooted", PATH_MAX);
|
||||
fprintf(stderr, "checking file in '%s'\n", chrooted);
|
||||
|
||||
chrooted_rv = stat(chrooted, &chrooted_stat);
|
||||
|
|
Loading…
Reference in New Issue