DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] example/ip_pipeline: fix buffer size warning
@ 2015-12-11 11:29 Fan Zhang
  2015-12-11 11:29 ` [dpdk-dev] [PATCH] example/ip_pipeline: fix copy into fixed size buffer defect Fan Zhang
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Fan Zhang @ 2015-12-11 11:29 UTC (permalink / raw)
  To: dev

Coverity issue: 107102
Fixes: 7f64b9c004aa ("examples/ip_pipeline: rework config file syntax")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
 examples/ip_pipeline/config_parse_tm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ip_pipeline/config_parse_tm.c b/examples/ip_pipeline/config_parse_tm.c
index cdebbdc..3932247 100644
--- a/examples/ip_pipeline/config_parse_tm.c
+++ b/examples/ip_pipeline/config_parse_tm.c
@@ -349,7 +349,7 @@ tm_cfgfile_load_sched_subport(
 					char *tokens[2] = {NULL, NULL};
 					int n_tokens;
 					int begin, end;
-					char name[CFG_NAME_LEN];
+					char name[CFG_NAME_LEN + 1];
 
 					profile = atoi(entries[j].value);
 					strncpy(name,
-- 
2.5.0

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [dpdk-dev] [PATCH] example/ip_pipeline: fix copy into fixed size buffer defect
@ 2015-12-11 16:01 Fan Zhang
  2015-12-11 16:27 ` Mcnamara, John
  0 siblings, 1 reply; 16+ messages in thread
From: Fan Zhang @ 2015-12-11 16:01 UTC (permalink / raw)
  To: dev

Coverity issue: 107133
Fixes: eb32fe7c5574 ("examples/ip_pipeline: rework initialization parameters")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
*v2
fixed bug: fix possible buff not null terminated bug

 examples/ip_pipeline/init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
index bc6d6d9..cabc4f7 100644
--- a/examples/ip_pipeline/init.c
+++ b/examples/ip_pipeline/init.c
@@ -1068,7 +1068,8 @@ static void app_pipeline_params_get(struct app_params *app,
 	uint32_t i;
 	uint32_t mempool_id;
 
-	strcpy(p_out->name, p_in->name);
+	strncpy(p_out->name, p_in->name, PIPELINE_NAME_SIZE);
+	p_out->name[PIPELINE_NAME_SIZE - 1] = '\0';
 
 	p_out->socket_id = (int) p_in->socket_id;
 
-- 
2.5.0

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

end of thread, other threads:[~2015-12-13  1:34 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11 11:29 [dpdk-dev] [PATCH] example/ip_pipeline: fix buffer size warning Fan Zhang
2015-12-11 11:29 ` [dpdk-dev] [PATCH] example/ip_pipeline: fix copy into fixed size buffer defect Fan Zhang
2015-12-11 15:37   ` Mcnamara, John
2015-12-11 16:16     ` Richardson, Bruce
2015-12-11 11:29 ` [dpdk-dev] [PATCH] example/ip_pipeline: fix copy-paste error Fan Zhang
2015-12-11 15:20   ` Mcnamara, John
2015-12-11 11:29 ` [dpdk-dev] [PATCH] example/ip_pipeline: fix logically deadnode defect Fan Zhang
2015-12-11 15:22   ` Mcnamara, John
2015-12-11 11:29 ` [dpdk-dev] [PATCH] example/ip_pipeline: fix overrunning byffer defect Fan Zhang
2015-12-11 15:25   ` Mcnamara, John
2015-12-11 11:29 ` [dpdk-dev] [PATCH] example/ip_pipeline: fix value overwrite Fan Zhang
2015-12-11 15:44   ` Mcnamara, John
2015-12-11 14:59 ` [dpdk-dev] [PATCH] example/ip_pipeline: fix buffer size warning Mcnamara, John
2015-12-13  1:34   ` Thomas Monjalon
2015-12-11 16:01 [dpdk-dev] [PATCH] example/ip_pipeline: fix copy into fixed size buffer defect Fan Zhang
2015-12-11 16:27 ` Mcnamara, John

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).