*ed->host_info = host_info;
ed->host_info->num_cpus = vlib_get_n_threads ();
- strncpy ((char *) ed->host_info->kernel_ver_str, VPP_BUILD_VER,
- sizeof (ed->host_info->kernel_ver_str) - 1);
+ snprintf ((char *) ed->host_info->kernel_ver_str,
+ sizeof (ed->host_info->kernel_ver_str), "%.*s",
+ (int) (sizeof (ed->host_info->kernel_ver_str) - 1), VPP_BUILD_VER);
ena_set_mem_addr (vm, dev, &host_attr.os_info_ba, ed->host_info);
if ((rv = ena_aq_set_feature (vm, dev, ENA_ADMIN_FEAT_ID_HOST_ATTR_CONFIG,