From: Wojciech Dec Date: Tue, 3 Jan 2017 09:38:37 +0000 (+0100) Subject: Fix crash on null vhost-user socket - VPP-573 X-Git-Tag: odp_vpp~823 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=3cd9eed64b82bd50735434e0679e7fd085ec2884;p=odp4vpp.git Fix crash on null vhost-user socket - VPP-573 Fix for VPP-573. Change-Id: If7d9690901efebf62fdf28219097153d98c79c0c Signed-off-by: Wojciech Dec --- diff --git a/src/vnet/devices/virtio/vhost-user.c b/src/vnet/devices/virtio/vhost-user.c index bde8106c..f9bbae4f 100644 --- a/src/vnet/devices/virtio/vhost-user.c +++ b/src/vnet/devices/virtio/vhost-user.c @@ -2578,6 +2578,11 @@ vhost_user_create_if (vnet_main_t * vnm, vlib_main_t * vm, int rv = 0; int server_sock_fd = -1; + if (sock_filename == NULL || !(strlen (sock_filename) > 0)) + { + return VNET_API_ERROR_INVALID_ARGUMENT; + } + if (is_server) { if ((rv =