X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=redirects.c;h=6cd09f16143d84d3737c3157e4c3b23b1e280f94;hb=72684e5bb8d3a7deb0cfdafa77b40be0b6360ccd;hp=7f9948cd3bb77a3a83b3553615d5e3ef4d677404;hpb=30463d08056db8f03d17c0569581aef96418c38d;p=project%2Ffirewall3.git diff --git a/redirects.c b/redirects.c index 7f9948c..6cd09f1 100644 --- a/redirects.c +++ b/redirects.c @@ -466,7 +466,7 @@ set_redirect(struct fw3_ipt_rule *r, struct fw3_port *port) if (port->port_min == port->port_max) sprintf(buf, "%u", port->port_min); else - sprintf(buf, "%u-%u", port->port_min, port->port_max); + snprintf(buf, sizeof(buf), "%u-%u", port->port_min, port->port_max); fw3_ipt_rule_addarg(r, false, "--to-ports", buf); }