examples/vhost_scsi: fix product id string termination
authorJacek Piasecki <jacekx.piasecki@intel.com>
Wed, 25 Oct 2017 10:07:18 +0000 (12:07 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 25 Oct 2017 10:16:51 +0000 (12:16 +0200)
commit681459bf9cd5778ada011e6d8d681436ec5394f0
tree7035c4840552fa465ddf3c194390d6fe20f39efe
parent1e02d735c1446705592ca8d89b4b500f9492a8ef
examples/vhost_scsi: fix product id string termination

Use snprintf instead strncpy to get safe null string termination.
There was possible to get not terminated string after strncpy operation.

Coverity issue: 158631
Fixes: db75c7af19bb ("examples/vhost_scsi: introduce a new sample app")
Cc: stable@dpdk.org
Signed-off-by: Jacek Piasecki <jacekx.piasecki@intel.com>
Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>
examples/vhost_scsi/scsi.c