diff options
author | Anand B Jyoti <anand.b.jyoti@intel.com> | 2017-10-04 10:15:40 +0530 |
---|---|---|
committer | Anand B Jyoti <anand.b.jyoti@intel.com> | 2017-10-05 07:23:14 +0530 |
commit | 2e53911bb32745221fdc077d06237abc44ad9962 (patch) | |
tree | e9accecdae16f114058776eaeed7a1346dd3ca85 /VNFs/vACL/pipeline | |
parent | 58c7eb1100e51176c20e5d57250cb46ed7020fa3 (diff) |
VNFs: Fixing klocwork issue in VNFs code
JIRA: SAMPLEVNF-83
This patch fixes the klocwork reported issues
Change-Id: I190d024777be1bf53cdc97feca1e5934781f3582
Signed-off-by: Anand B Jyoti <anand.b.jyoti@intel.com>
Diffstat (limited to 'VNFs/vACL/pipeline')
-rw-r--r-- | VNFs/vACL/pipeline/pipeline_acl_be.c | 4 | ||||
-rw-r--r-- | VNFs/vACL/pipeline/pipeline_acl_be.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/VNFs/vACL/pipeline/pipeline_acl_be.c b/VNFs/vACL/pipeline/pipeline_acl_be.c index d3fa0519..512c2f64 100644 --- a/VNFs/vACL/pipeline/pipeline_acl_be.c +++ b/VNFs/vACL/pipeline/pipeline_acl_be.c @@ -2638,7 +2638,7 @@ static void *pipeline_acl_init(struct pipeline_params *params, if (p == NULL) return NULL; - strcpy(p->name, params->name); + strncpy(p->name, params->name, PIPELINE_NAME_SIZE); p->log_level = params->log_level; PLOG(p, HIGH, "ACL"); @@ -2681,7 +2681,7 @@ static void *pipeline_acl_init(struct pipeline_params *params, rte_ACL_hi_counter_block_in_use++; counter_ptr = &rte_acl_counter_table[rte_ACL_hi_counter_block_in_use]; - strcpy(counter_ptr->name, params->name); + strncpy(counter_ptr->name, params->name,PIPELINE_NAME_SIZE); p_acl->action_counter_index = rte_ACL_hi_counter_block_in_use; p_acl->counters = counter_ptr; diff --git a/VNFs/vACL/pipeline/pipeline_acl_be.h b/VNFs/vACL/pipeline/pipeline_acl_be.h index bbb20e82..edce7e4c 100644 --- a/VNFs/vACL/pipeline/pipeline_acl_be.h +++ b/VNFs/vACL/pipeline/pipeline_acl_be.h @@ -64,7 +64,7 @@ extern uint8_t ACL_DEBUG; * One counter block per ACL Thread */ struct rte_ACL_counter_block { - char name[32]; + char name[PIPELINE_NAME_SIZE]; /* as long as a counter doesn't cross cache line, writes are atomic */ uint64_t tpkts_processed; uint64_t bytes_processed; /* includes all L3 and higher headers */ |