On 3/23/2018 7:52 AM, Tomasz Duszynski wrote: > On Thu, Mar 22, 2018 at 06:18:47PM +0000, Ferruh Yigit wrote: >> gcc version: >> aarch64-linux-gnu-gcc (Linaro GCC 7.2-2017.11) 7.2.1 20171011 >> >> build error: >> CC mrvl_qos.o >> .../drivers/net/mrvl/mrvl_qos.c: In function ‘mrvl_configure_rxqs’: >> .../drivers/net/mrvl/mrvl_qos.c:679:17: >> error: ‘sprintf’ may write a terminating nul past the end of the >> destination [-Werror=format-overflow=] >> sprintf(match, "policer-%d:%d\n", priv->pp_id, priv->ppio_id); >> ^~~~~~~~~~~~~~~~~ >> .../drivers/net/mrvl/mrvl_qos.c:679:2: >> note: ‘sprintf’ output between 13 and 17 bytes into a destination >> of size 16 >> sprintf(match, "policer-%d:%d\n", priv->pp_id, priv->ppio_id); >> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> Fixed by replacing sprintf to snprintf. >> >> Fixes: 8860fd7b70f0 ("net/mrvl: add ingress policer support") >> Cc: t...@semihalf.com >> >> Signed-off-by: Ferruh Yigit <ferruh.yi...@intel.com>
> Acked-by: Tomasz Duszynski <t...@semihalf.com> Squashed into relevant commit in next-net, thanks.