app/procinfo: fix strncpy usage in args parsing
authorRadu Nicolau <radu.nicolau@intel.com>
Tue, 20 Feb 2018 13:52:22 +0000 (13:52 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 27 Mar 2018 22:35:37 +0000 (00:35 +0200)
commitf0b9479497741040476aae5008afe84e0467e586
treee9a120577e49c8785326469a207e8399879d3eb2
parentfada6963ce735048b2d40f215ff110cb2f4cb6a4
app/procinfo: fix strncpy usage in args parsing

Replace strncpy with snprintf to avoid overwriting the last
NULL character.

Coverity issue: 143252
Fixes: 2deb6b5246d7 ("app/procinfo: add collectd format and host id")
Cc: stable@dpdk.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
app/proc-info/main.c