Browse Source

fix warning about ifr_name size

Signed-off-by: R4SAS <r4sas@i2pmail.org>
pull/1687/head
R4SAS 3 years ago
parent
commit
455c71ff25
  1. 2
      libi2pd/util.cpp

2
libi2pd/util.cpp

@ -344,7 +344,7 @@ namespace net @@ -344,7 +344,7 @@ namespace net
if(fd > 0)
{
ifreq ifr;
strncpy(ifr.ifr_name, ifa->ifa_name, IFNAMSIZ); // set interface for query
strncpy(ifr.ifr_name, ifa->ifa_name, IFNAMSIZ-1); // set interface for query
if(ioctl(fd, SIOCGIFMTU, &ifr) >= 0)
mtu = ifr.ifr_mtu; // MTU
else

Loading…
Cancel
Save