sprintf function is not secure as it doesn't check the length of string.
More secure function snprintf is used.
Fixes:
2a9c83ae3b ("test/eventdev: add multi-ports test")
Cc: stable@dpdk.org
Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
/* add the max port for rx_adapter */
port_index = rte_eth_dev_count_total();
for (; port_index < RTE_MAX_ETHPORTS; port_index += 1) {
- sprintf(driver_name, "%s%u", "net_null", drv_id);
+ snprintf(driver_name, sizeof(driver_name), "%s%u", "net_null",
+ drv_id);
err = rte_vdev_init(driver_name, NULL);
TEST_ASSERT(err == 0, "Failed driver %s got %d",
driver_name, err);