git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
cmdline: avoid garbage in unused fields of parsed result
[dpdk.git]
/
lib
/
librte_cmdline
/
cmdline_parse.c
diff --git
a/lib/librte_cmdline/cmdline_parse.c
b/lib/librte_cmdline/cmdline_parse.c
index
c74b146
..
7f799f9
100644
(file)
--- a/
lib/librte_cmdline/cmdline_parse.c
+++ b/
lib/librte_cmdline/cmdline_parse.c
@@
-168,6
+168,8
@@
match_inst(cmdline_parse_inst_t *inst, const char *buf,
int n = 0;
struct cmdline_token_hdr token_hdr;
+ if (resbuf != NULL)
+ memset(resbuf, 0, resbuf_size);
/* check if we match all tokens of inst */
while (!nb_match_token || i < nb_match_token) {
token_p = get_token(inst, i);