app/procinfo: use strlcpy for copying string
authorCiara Power <ciara.power@intel.com>
Thu, 26 Sep 2019 15:11:59 +0000 (16:11 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Sun, 27 Oct 2019 10:33:24 +0000 (11:33 +0100)
commit7edbf7ddfd7d2453afaad3b72666491d30b616af
tree1ab7a0bf99388bd34bd6f908989b7d0837aae4c9
parent49e7e2dee3f05bb3ba2e14cea5318915a3b47f59
app/procinfo: use strlcpy for copying string

Replaced strncpy and strcpy with strlcpy.
Also replaced snprintf with strlcpy where applicable.
Using strlcpy is safe practice when copying strings, as it will include
a null terminator.

Fixes: 2deb6b5246d7 ("app/procinfo: add collectd format and host id")
Fixes: 8a37f37fc243 ("app/procinfo: add --show-port")
Cc: stable@dpdk.org
Reported-by: Reshma Pattan <reshma.pattan@intel.com>
Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
app/proc-info/main.c