X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=drivers%2Fevent%2Fopdl%2Fopdl_evdev_xstats.c;h=27b3d88023114bbbcdef27223532e05e0cfabf8f;hb=refs%2Fchanges%2F93%2F20493%2F1;hp=0e6c6bd5e3f138c8eada6c50c58c6bdf304118a5;hpb=ca33590b6af032bff57d9cc70455660466a654b2;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;