net/af_packet: prefer snprintf against strncpy
authorFerruh Yigit <ferruh.yigit@intel.com>
Thu, 4 May 2017 11:16:59 +0000 (12:16 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 5 May 2017 15:52:55 +0000 (17:52 +0200)
commit131fe443469f1de5fda3614e20077fad93eae907
treed2a6316c7acce8ee47c0d4ed1b301cc779ac3417
parent6839dae96c264a5c3f343f28977997532e5d0a44
net/af_packet: prefer snprintf against strncpy

strncpy may left destination buffer not NULL terminated, switched using
snprintf to be sure destination buffer is NULL terminated.

Coverity issue: 1407495
Coverity issue: 1407498
Fixes: cc68ac4847bc ("net/af_packet: support MTU change")
Fixes: 218259590ea4 ("net/af_packet: support promiscuous")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
drivers/net/af_packet/rte_eth_af_packet.c