All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 5/5] Replacing the unsafe strcpy function
@ 2026-09-15  9:58 Evgeny Sokolov
  2026-09-15 13:26 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Evgeny Sokolov @ 2026-09-15  9:58 UTC (permalink / raw)
  To: Thomas Monjalon, Andrew Rybchenko; +Cc: dev, stable, mukawa, Sokolov Evgeny

From: Sokolov Evgeny <Evgeny.Sokolov@infotecs.ru>

---
 lib/ethdev/rte_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ethdev/rte_ethdev.c b/lib/ethdev/rte_ethdev.c
index 55ea8fe808..b040f9fa84 100644
--- a/lib/ethdev/rte_ethdev.c
+++ b/lib/ethdev/rte_ethdev.c
@@ -718,7 +718,7 @@ rte_eth_dev_get_name_by_port(uint16_t port_id, char *name)
 	tmp = eth_dev_shared_data->data[port_id].name;
 	rte_spinlock_unlock(rte_mcfg_ethdev_get_lock());
 
-	strcpy(name, tmp);
+	strncpy(name, tmp, RTE_ETH_NAME_MAX_LEN);
 
 	rte_ethdev_trace_get_name_by_port(port_id, name);
 
-- 
2.39.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-15 13:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-15  9:58 [PATCH 5/5] Replacing the unsafe strcpy function Evgeny Sokolov
2026-09-15 13:26 ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.