commit | 3cd9eed64b82bd50735434e0679e7fd085ec2884 | [log] [tgz] |
---|---|---|
author | Wojciech Dec <wdec@cisco.com> | Tue Jan 03 10:38:37 2017 +0100 |
committer | Damjan Marion <dmarion.lists@gmail.com> | Tue Jan 03 10:41:32 2017 +0000 |
tree | 41f19c1d13cb29d1a017ecc45859f0f5f38f94ae | |
parent | d63370ccb3941ef752e06c397f74e39abbd52ed3 [diff] |
Fix crash on null vhost-user socket - VPP-573 Fix for VPP-573. Change-Id: If7d9690901efebf62fdf28219097153d98c79c0c Signed-off-by: Wojciech Dec <wdec@cisco.com>
diff --git a/src/vnet/devices/virtio/vhost-user.c b/src/vnet/devices/virtio/vhost-user.c index bde8106..f9bbae4 100644 --- a/src/vnet/devices/virtio/vhost-user.c +++ b/src/vnet/devices/virtio/vhost-user.c
@@ -2578,6 +2578,11 @@ 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 =