From: Philip Prindeville Date: Fri, 19 Feb 2021 20:49:35 +0000 (-0700) Subject: firewall3: remove last remaining sprintf() X-Git-Url: http://git.openwrt.org/feed/routing.git;lede-17.01?a=commitdiff_plain;h=c2c72c6fc29cb895f25759d76e10c00a8faaa148;p=project%2Ffirewall3.git firewall3: remove last remaining sprintf() Signed-off-by: Philip Prindeville Reviewed-by: Rosen Penev --- 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);