vhost: fix sprintf with snprintf
authorPallantla Poornima <pallantlax.poornima@intel.com>
Mon, 4 Feb 2019 07:28:06 +0000 (07:28 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 22 Feb 2019 13:39:49 +0000 (14:39 +0100)
commit7c7b7562252742a6c298de64df486873336fd058
tree4c39e960809d6ac5a658a25179aba816dc42173c
parent054617fd82b6d99595520e75fdab6706f39d5643
vhost: fix sprintf with snprintf

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

Fixes: d7280c9fffcb ("vhost: support selective datapath")
Cc: stable@dpdk.org
Signed-off-by: Pallantla Poornima <pallantlax.poornima@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Acked-by: Tiwei Bie <tiwei.bie@intel.com>
lib/librte_vhost/vdpa.c