DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/ip_pipeline: fixes uninitialized scalar variable
@ 2018-04-18 16:58 Reshma Pattan
  2018-04-18 16:58 ` [dpdk-dev] [PATCH] examples/ip_pipeline: fix buffer not null terminated Reshma Pattan
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Reshma Pattan @ 2018-04-18 16:58 UTC (permalink / raw)
  To: dev; +Cc: jasvinder.singh, Reshma Pattan

Using uninitialized value p.thread_id when calling kni_create.
Initialize the kni_params object to 0.

Coverity issue: 272569
Fixes: 9a408cc8ac ("examples/ip_pipeline: add KNI object")
CC: jasvinder.singh@intel.com

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 examples/ip_pipeline/cli.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c
index 199a31ff8..575e176c1 100644
--- a/examples/ip_pipeline/cli.c
+++ b/examples/ip_pipeline/cli.c
@@ -651,6 +651,7 @@ cmd_kni(char **tokens,
 	char *name;
 	struct kni *kni;
 
+	memset(&p, 0, sizeof(p));
 	if ((n_tokens != 6) && (n_tokens != 8)) {
 		snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]);
 		return;
-- 
2.14.3

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

end of thread, other threads:[~2018-04-19  8:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-18 16:58 [dpdk-dev] [PATCH] examples/ip_pipeline: fixes uninitialized scalar variable Reshma Pattan
2018-04-18 16:58 ` [dpdk-dev] [PATCH] examples/ip_pipeline: fix buffer not null terminated Reshma Pattan
2018-04-19  8:36   ` Singh, Jasvinder
2018-04-18 16:58 ` [dpdk-dev] [PATCH] examples/ip_pipipeline: fix resource leak Reshma Pattan
2018-04-19  8:37   ` Singh, Jasvinder
2018-04-18 16:58 ` [dpdk-dev] [PATCH] examples/ip_pipeline: fix buffer not null terminated Reshma Pattan
2018-04-19  8:35   ` Singh, Jasvinder
2018-04-19  8:37 ` [dpdk-dev] [PATCH] examples/ip_pipeline: fixes uninitialized scalar variable Singh, Jasvinder

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