DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH v2] example/ip_pipeline: fix copy into fixed size buffer defect
@ 2015-12-11 17:19 Fan Zhang
  2015-12-13  1:31 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Fan Zhang @ 2015-12-11 17:19 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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/ip_pipeline/init.c b/examples/ip_pipeline/init.c
index bc6d6d9..186ca03 100644
--- a/examples/ip_pipeline/init.c
+++ b/examples/ip_pipeline/init.c
@@ -1068,7 +1068,7 @@ static void app_pipeline_params_get(struct app_params *app,
 	uint32_t i;
 	uint32_t mempool_id;
 
-	strcpy(p_out->name, p_in->name);
+	snprintf(p_out->name, PIPELINE_NAME_SIZE, "%s", p_in->name);
 
 	p_out->socket_id = (int) p_in->socket_id;
 
-- 
2.5.0

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

* Re: [dpdk-dev] [PATCH v2] example/ip_pipeline: fix copy into fixed size buffer defect
  2015-12-11 17:19 [dpdk-dev] [PATCH v2] example/ip_pipeline: fix copy into fixed size buffer defect Fan Zhang
@ 2015-12-13  1:31 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2015-12-13  1:31 UTC (permalink / raw)
  To: Fan Zhang; +Cc: dev

2015-12-11 17:19, Fan Zhang:
> 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>

Applied, thanks

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-11 17:19 [dpdk-dev] [PATCH v2] example/ip_pipeline: fix copy into fixed size buffer defect Fan Zhang
2015-12-13  1:31 ` Thomas Monjalon

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).