DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] lib/cmdline: init parse result memeory
@ 2017-11-15 15:54 Xueming Li
  2017-12-07 14:48 ` Olivier MATZ
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Xueming Li @ 2017-11-15 15:54 UTC (permalink / raw)
  To: Olivier Matz; +Cc: Xueming Li, dev

Initialize binary result memory before parsing to avoid garbage in
parsing result.

Signed-off-by: Xueming Li <xuemingl@mellanox.com>
---
 lib/librte_cmdline/cmdline_parse.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_cmdline/cmdline_parse.c b/lib/librte_cmdline/cmdline_parse.c
index 3e12ee54f..9124758f1 100644
--- a/lib/librte_cmdline/cmdline_parse.c
+++ b/lib/librte_cmdline/cmdline_parse.c
@@ -267,6 +267,8 @@ cmdline_parse(struct cmdline *cl, const char * buf)
 	if (!cl || !buf)
 		return CMDLINE_PARSE_BAD_ARGS;
 
+	memset(tmp_result.buf, 0, sizeof(tmp_result.buf));
+
 	ctx = cl->ctx;
 
 	/*
-- 
2.13.3

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

end of thread, other threads:[~2018-01-25 22:15 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-15 15:54 [dpdk-dev] [PATCH] lib/cmdline: init parse result memeory Xueming Li
2017-12-07 14:48 ` Olivier MATZ
2017-12-07 15:05   ` Xueming(Steven) Li
2017-12-07 15:35     ` Xueming(Steven) Li
2017-12-07 17:13       ` Adrien Mazarguil
2017-12-08  7:02 ` [dpdk-dev] [PATCH v1] lib/cmdline: init parse result memory Xueming Li
2017-12-08 12:27   ` Adrien Mazarguil
2017-12-08 13:51     ` Olivier MATZ
2017-12-08 14:50       ` Xueming(Steven) Li
2017-12-08 15:04       ` Adrien Mazarguil
2017-12-08 15:26         ` Olivier MATZ
2017-12-09 15:39 ` [dpdk-dev] [PATCH v2] lib/cmdline: init CLI parsing memory Xueming Li
2017-12-14 15:35   ` Olivier MATZ
2017-12-18 10:51     ` Adrien Mazarguil
2017-12-18 13:44       ` Xueming(Steven) Li
2017-12-26 12:57     ` Xueming(Steven) Li
2018-01-16 12:45       ` Olivier Matz
2018-01-18  4:29         ` Xueming(Steven) Li
2018-01-19  9:07           ` Olivier Matz
2018-01-19 18:18             ` Xueming(Steven) Li
2018-01-19 18:16 ` [dpdk-dev] [PATCH v3] cmdline: fix dynamic tokens parsing Xueming Li
2018-01-22 13:13   ` Olivier Matz
2018-01-25 22:14     ` [dpdk-dev] [dpdk-stable] " 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).