pid_t child;
int bytes, pipefd[2];
char *token, *saveptr = NULL;
- char netdev_link[IFNAMSIZ + 1];
+ char netdev_link[IFNAMSIZ];
char buffer[MAXPATHLEN] = {0};
if (netdev->type != LXC_NET_VETH) {
}
if (netdev->link[0] != '\0')
- strncpy(netdev_link, netdev->link, IFNAMSIZ);
+ strncpy(netdev_link, netdev->link, IFNAMSIZ - 1);
else
- strncpy(netdev_link, "none", IFNAMSIZ);
+ strncpy(netdev_link, "none", IFNAMSIZ - 1);
ret = snprintf(pidstr, LXC_NUMSTRLEN64, "%d", pid);
if (ret < 0 || ret >= LXC_NUMSTRLEN64)