net/virtio-user: fix TAP name string termination
authorSebastian Basierski <sebastianx.basierski@intel.com>
Tue, 19 Sep 2017 11:41:04 +0000 (13:41 +0200)
committerYuanhan Liu <yliu@fridaylinux.org>
Tue, 10 Oct 2017 13:54:31 +0000 (15:54 +0200)
commit907d125e2c3a4801558c2f6988e54f427e1b444a
tree102501ea20aec6eff27565ce47b73c10d10e7e1f
parentda4f2e4bb76e09a88fe2aabde1f89a7fc0dc9d0f
net/virtio-user: fix TAP name string termination

Fix calling strncpy with the a maximum size equal of destination
array size.

Coverity issue: 140732
Fixes: e3b434818bbb ("net/virtio-user: support kernel vhost")
Cc: stable@dpdk.org
Signed-off-by: Sebastian Basierski <sebastianx.basierski@intel.com>
Acked-by: Jianfeng Tan <jianfeng.tan@intel.com>
Acked-by: Yuanhan Liu <yliu@fridaylinux.org>
drivers/net/virtio/virtio_user/vhost_kernel_tap.c