Merge pull request #1779 from runcom/gcc8-fix
nsexec.c: fix GCC 8 warning
This commit is contained in:
commit
f753f300ae
|
@ -505,7 +505,8 @@ void join_namespaces(char *nslist)
|
||||||
|
|
||||||
ns->fd = fd;
|
ns->fd = fd;
|
||||||
ns->ns = nsflag(namespace);
|
ns->ns = nsflag(namespace);
|
||||||
strncpy(ns->path, path, PATH_MAX);
|
strncpy(ns->path, path, PATH_MAX - 1);
|
||||||
|
ns->path[PATH_MAX - 1] = '\0';
|
||||||
} while ((namespace = strtok_r(NULL, ",", &saveptr)) != NULL);
|
} while ((namespace = strtok_r(NULL, ",", &saveptr)) != NULL);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue