net/nfp: fix possible buffer overflow
authorPallantla Poornima <pallantlax.poornima@intel.com>
Fri, 8 Mar 2019 10:28:05 +0000 (10:28 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 21 Mar 2019 17:01:32 +0000 (18:01 +0100)
commit968e9c14f3fe51174e8cda7eb9148985f28f1bb3
treeb888e475b4a436d896c06bec3848baa1ba1d8d12
parent683d1e82a0f2caae1a9c6f1209ab4d743373a173
net/nfp: fix possible buffer overflow

sprintf function is not secure as it doesn't check the length of string.
More secure function snprintf is used.

Fixes: 896c265ef954 ("net/nfp: use new CPP interface")
Fixes: c4171b520b3f ("net/nfp: support PF multiport")
Cc: stable@dpdk.org
Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Tested-by: Alejandro Lucero <alejandro.lucero@netronome.com>
drivers/net/nfp/nfp_net.c