From: Reshma Pattan <reshma.pat...@intel.com>

Replace strcpy with strlcpy to avoid buffer overrun.

Coverity issue: 323515

Fixes: b767f8efc8 ("net/softnic: replace pointers with arrays")
CC: cristian.dumitre...@intel.com
CC: jasvinder.si...@intel.com

Signed-off-by: Reshma Pattan <reshma.pat...@intel.com>
---
 drivers/net/softnic/rte_eth_softnic_cli.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/softnic/rte_eth_softnic_cli.c 
b/drivers/net/softnic/rte_eth_softnic_cli.c
index 2235b07e8..a0beca904 100644
--- a/drivers/net/softnic/rte_eth_softnic_cli.c
+++ b/drivers/net/softnic/rte_eth_softnic_cli.c
@@ -2485,7 +2485,8 @@ cmd_pipeline_table(struct pmd_internals *softnic,
                        return;
                }
 
-               strcpy(p.action_profile_name, tokens[t0 + 1]);
+               strlcpy(p.action_profile_name, tokens[t0 + 1],
+                       sizeof(p.action_profile_name));
 
                t0 += 2;
        }
-- 
2.17.1

Reply via email to