From: Reshma Pattan <[email protected]>
Use strlcpy instead of strcpy to avoid buffer overrun.
Coverity issue: 323475
Fixes: c169b6a588 ("net/softnic: map flow attribute to pipeline table")
CC: [email protected]
CC: [email protected]
Signed-off-by: Reshma Pattan <[email protected]>
---
drivers/net/softnic/rte_eth_softnic_flow.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/softnic/rte_eth_softnic_flow.c
b/drivers/net/softnic/rte_eth_softnic_flow.c
index 285af462b..295bc6c83 100644
--- a/drivers/net/softnic/rte_eth_softnic_flow.c
+++ b/drivers/net/softnic/rte_eth_softnic_flow.c
@@ -56,7 +56,7 @@ flow_attr_map_set(struct pmd_internals *softnic,
map = (ingress) ? &softnic->flow.ingress_map[group_id] :
&softnic->flow.egress_map[group_id];
- strcpy(map->pipeline_name, pipeline_name);
+ strlcpy(map->pipeline_name, pipeline_name, sizeof(map->pipeline_name));
map->table_id = table_id;
map->valid = 1;
--
2.17.1