enter-chroot: use strlcat instead of strncat.

This assumes running environment is musl. Mistake pointed out by duncaen.
This commit is contained in:
Érico Rolim 2020-09-01 00:22:17 -03:00
parent 937e1b8e82
commit 18cbf06cd4
1 changed files with 1 additions and 1 deletions

View File

@ -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);