nsexec.c: fix GCC 8 warning

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
Antonio Murdaca 2018-04-12 12:25:06 +02:00
parent 3cbb2fa3c4
commit 1a5064622c
No known key found for this signature in database
GPG Key ID: B2BEAD150DE936B9
1 changed files with 2 additions and 1 deletions

View File

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