diff options
Diffstat (limited to 'src/vnet/devices/virtio')
-rw-r--r-- | src/vnet/devices/virtio/vhost-user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/devices/virtio/vhost-user.c b/src/vnet/devices/virtio/vhost-user.c index 92447765726..f6406d469b2 100644 --- a/src/vnet/devices/virtio/vhost-user.c +++ b/src/vnet/devices/virtio/vhost-user.c @@ -3188,8 +3188,8 @@ vhost_user_dump_ifs (vnet_main_t * vnm, vlib_main_t * vm, vuid->is_server = vui->unix_server_index != ~0; vuid->sock_errno = vui->sock_errno; strncpy ((char *) vuid->sock_filename, (char *) vui->sock_filename, - ARRAY_LEN (vuid->sock_filename) - 1); - + sizeof (vuid->sock_filename)); + vuid->sock_filename[ARRAY_LEN (vuid->sock_filename) - 1] = '\0'; s = format (s, "%v%c", hi->name, 0); strncpy ((char *) vuid->if_name, (char *) s, |