X-Git-Url: http://git.sameswireless.fr/l2tpns.git/blobdiff_plain/8f944eeb2197070c98c0e98b92d95cf3d35fdf67..4344f5e9c73e2ac36b67e72a400114063f037031:/l2tpns.c diff --git a/l2tpns.c b/l2tpns.c index 8224275..9f5e901 100644 --- a/l2tpns.c +++ b/l2tpns.c @@ -611,8 +611,8 @@ static void inittun(void) LOG(0, 0, 0, "Can't set tun interface: %s\n", strerror(errno)); exit(1); } - assert(strlen(ifr.ifr_name) < sizeof(config->tundevice)); - strncpy(config->tundevice, ifr.ifr_name, sizeof(config->tundevice) - 1); + assert(strlen(ifr.ifr_name) < sizeof(config->tundevice) - 1); + strncpy(config->tundevice, ifr.ifr_name, sizeof(config->tundevice)); { // get the interface index