summaryrefslogtreecommitdiffstats
path: root/iptables/nft-arp.c
diff options
context:
space:
mode:
Diffstat (limited to 'iptables/nft-arp.c')
-rw-r--r--iptables/nft-arp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/iptables/nft-arp.c b/iptables/nft-arp.c
index 08f88145..17101369 100644
--- a/iptables/nft-arp.c
+++ b/iptables/nft-arp.c
@@ -459,7 +459,8 @@ nft_arp_print_firewall(struct nft_rule *r, unsigned int num,
sprintf(buf, "%s", addr_to_dotted(&(fw.arp.src)));
else
sprintf(buf, "%s", addr_to_anyname(&(fw.arp.src)));
- strcat(buf, mask_to_dotted(&(fw.arp.smsk)));
+ strncat(buf, mask_to_dotted(&(fw.arp.smsk)),
+ sizeof(buf) - strlen(buf) - 1);
printf("-s %s ", buf);
}
@@ -483,7 +484,8 @@ after_devsrc:
sprintf(buf, "%s", addr_to_dotted(&(fw.arp.tgt)));
else
sprintf(buf, "%s", addr_to_anyname(&(fw.arp.tgt)));
- strcat(buf, mask_to_dotted(&(fw.arp.tmsk)));
+ strncat(buf, mask_to_dotted(&(fw.arp.tmsk)),
+ sizeof(buf) - strlen(buf) - 1);
printf("-d %s ", buf);
}