[dpdk-dev] [PATCH 3/4] net/softnic: fix string copy
Reshma Pattan
reshma.pattan at intel.com
Tue Oct 30 15:22:51 CET 2018
From: Reshma Pattan <reshma.pattan at intel.com>
Use strlcpy instead of strcpy to avoid buffer overrun.
Coverity issue: 323475
Fixes: c169b6a588 ("net/softnic: map flow attribute to pipeline table")
CC: cristian.dumitrescu at intel.com
CC: jasvinder.singh at intel.com
Signed-off-by: Reshma Pattan <reshma.pattan at intel.com>
---
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
More information about the dev
mailing list