[dpdk-stable] [dpdk-dev] [PATCH] app/proc-info: fix string copying to use strlcpy

Bruce Richardson bruce.richardson at intel.com
Thu Sep 26 16:44:20 CEST 2019


On Thu, Sep 26, 2019 at 04:11:59PM +0100, Ciara Power wrote:
> 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.
> 
> Cc: romanx.korynkevych at intel.com
> Cc: vipin.varghese at intel.com
> Cc: stable at dpdk.org
> 
> Fixes: 2deb6b5246d7 ("app/procinfo: add collectd format and host id")
> Fixes: 8a37f37fc243 ("app/procinfo: add --show-port")
> Reported-by: Reshma Pattan <reshma.pattan at intel.com>
> Signed-off-by: Ciara Power <ciara.power at intel.com>
> ---
+1 for using strlcpy over strncpy

Acked-by: Bruce Richardson <bruce.richardson at intel.com>


More information about the stable mailing list