cmdline: avoid garbage in unused fields of parsed result
authorXueming Li <xuemingl@mellanox.com>
Sat, 20 Jan 2018 03:26:31 +0000 (11:26 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 25 Jan 2018 22:16:53 +0000 (23:16 +0100)
commit0bf876008f4e51d8c006a3adb3866f0c35c33fbb
tree2c0e468dbafede0ac60eac0f5e2ac4ac10ef1c74
parent2acf7432ad3e67f676d7d14a6acc3b90a2d9117e
cmdline: avoid garbage in unused fields of parsed result

The result buffer was not initialized before parsing, inducing garbage
in unused fields or padding of the parsed structure.

Initialize the result buffer each time before parsing.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_cmdline/cmdline_parse.c