diff --git a/ww/devices/tun/tun_linux.c b/ww/devices/tun/tun_linux.c index 9fdcb54..07444ce 100644 --- a/ww/devices/tun/tun_linux.c +++ b/ww/devices/tun/tun_linux.c @@ -334,6 +334,7 @@ tun_device_t *createTunDevice(const char *name, bool offload, void *userdata, Tu if (*name) { strncpy(ifr.ifr_name, name, IFNAMSIZ); + ifr.ifr_name[IFNAMSIZ-1] = '\0'; } int err = ioctl(fd, TUNSETIFF, (void *) &ifr);