diff options
Diffstat (limited to 'iptables')
-rw-r--r-- | iptables/nft-ipv4.c | 4 | ||||
-rw-r--r-- | iptables/nft-ipv6.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/iptables/nft-ipv4.c b/iptables/nft-ipv4.c index a5b835b1..34f94bd8 100644 --- a/iptables/nft-ipv4.c +++ b/iptables/nft-ipv4.c @@ -348,11 +348,11 @@ static void nft_ipv4_post_parse(int command, */ cs->fw.ip.invflags = args->invflags; - strncpy(cs->fw.ip.iniface, args->iniface, IFNAMSIZ); + memcpy(cs->fw.ip.iniface, args->iniface, IFNAMSIZ); memcpy(cs->fw.ip.iniface_mask, args->iniface_mask, IFNAMSIZ*sizeof(unsigned char)); - strncpy(cs->fw.ip.outiface, args->outiface, IFNAMSIZ); + memcpy(cs->fw.ip.outiface, args->outiface, IFNAMSIZ); memcpy(cs->fw.ip.outiface_mask, args->outiface_mask, IFNAMSIZ*sizeof(unsigned char)); diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c index 46008fc5..d9c9400a 100644 --- a/iptables/nft-ipv6.c +++ b/iptables/nft-ipv6.c @@ -293,11 +293,11 @@ static void nft_ipv6_post_parse(int command, struct iptables_command_state *cs, */ cs->fw6.ipv6.invflags = args->invflags; - strncpy(cs->fw6.ipv6.iniface, args->iniface, IFNAMSIZ); + memcpy(cs->fw6.ipv6.iniface, args->iniface, IFNAMSIZ); memcpy(cs->fw6.ipv6.iniface_mask, args->iniface_mask, IFNAMSIZ*sizeof(unsigned char)); - strncpy(cs->fw6.ipv6.outiface, args->outiface, IFNAMSIZ); + memcpy(cs->fw6.ipv6.outiface, args->outiface, IFNAMSIZ); memcpy(cs->fw6.ipv6.outiface_mask, args->outiface_mask, IFNAMSIZ*sizeof(unsigned char)); |