Skip to content

Commit

Permalink
Merge pull request opencontainers#1779 from runcom/gcc8-fix
Browse files Browse the repository at this point in the history
nsexec.c: fix GCC 8 warning
  • Loading branch information
crosbymichael authored Apr 12, 2018
2 parents 9f0eca2 + 1a50646 commit f753f30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libcontainer/nsenter/nsexec.c
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,8 @@ void join_namespaces(char *nslist)

ns->fd = fd;
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);

/*
Expand Down

0 comments on commit f753f30

Please sign in to comment.