ethdev: replace snprintf with strlcpy for owner
authorStephen Hemminger <stephen@networkplumber.org>
Thu, 28 Feb 2019 22:47:53 +0000 (14:47 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Wed, 20 Mar 2019 17:15:42 +0000 (18:15 +0100)
commite97f83e452b8b2498c3c6ce2ff0cf94b65a62306
treebc109fb58643f86476d3040397b86c136cad2b5f
parentd9263ab13886f8b25a324e40ddb205f1a3f71c6d
ethdev: replace snprintf with strlcpy for owner

The set_port_owner was copying a string between structures of the
same type, therefore the name could never be truncated (unless source
string was not null terminated).  Use strlcpy which does it better.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
lib/librte_ethdev/rte_ethdev.c