From c2c72c6fc29cb895f25759d76e10c00a8faaa148 Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Fri, 19 Feb 2021 13:49:35 -0700 Subject: firewall3: remove last remaining sprintf() Signed-off-by: Philip Prindeville Reviewed-by: Rosen Penev --- iptables.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iptables.c b/iptables.c index 9e8fa74..49b3439 100644 --- a/iptables.c +++ b/iptables.c @@ -1022,7 +1022,7 @@ fw3_ipt_rule_icmptype(struct fw3_ipt_rule *r, struct fw3_icmptype *icmp) #endif { if (icmp->code_min == 0 && icmp->code_max == 0xFF) - sprintf(buf, "%u", icmp->type); + snprintf(buf, sizeof(buf), "%u", icmp->type); else snprintf(buf, sizeof(buf), "%u/%u", icmp->type, icmp->code_min); -- cgit v1.2.1