Skip to content

Commit

Permalink
fix warn
Browse files Browse the repository at this point in the history
  • Loading branch information
radkesvat committed Aug 18, 2024
1 parent db17c9a commit b5645b4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ww/devices/tun/tun_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b5645b4

Please sign in to comment.