X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=drivers%2Fevent%2Fopdl%2Fopdl_evdev_xstats.c;h=27b3d88023114bbbcdef27223532e05e0cfabf8f;hb=8d53e9f3c6001dcb2865f6e894da5b54e1418f88;hp=0e6c6bd5e3f138c8eada6c50c58c6bdf304118a5;hpb=e2bea7436061ca2e7e14bfcfdc5870f2555c3965;p=deb_dpdk.git diff --git a/drivers/event/opdl/opdl_evdev_xstats.c b/drivers/event/opdl/opdl_evdev_xstats.c index 0e6c6bd5..27b3d880 100644 --- a/drivers/event/opdl/opdl_evdev_xstats.c +++ b/drivers/event/opdl/opdl_evdev_xstats.c @@ -32,10 +32,9 @@ opdl_xstats_init(struct rte_eventdev *dev) uint32_t index = (i * max_num_port_xstat) + j; /* Name */ - sprintf(device->port_xstat[index].stat.name, - "port_%02u_%s", - i, - port_xstat_str[j]); + snprintf(device->port_xstat[index].stat.name, + sizeof(device->port_xstat[index].stat.name), + "port_%02u_%s", i, port_xstat_str[j]); /* ID */ device->port_xstat[index].id = index;