Use strlcpy rather than strncpy to avoid any issues about
null termination.
Coverity issue 302859
Fixes:
831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
#include <rte_common.h>
#include <rte_malloc.h>
#include <rte_bus_vmbus.h>
+#include <rte_string_fns.h>
#include "private.h"
goto error;
}
- strncpy((*uio_res)->path, devname, PATH_MAX);
+ strlcpy((*uio_res)->path, devname, PATH_MAX);
rte_uuid_copy((*uio_res)->id, dev->device_id);
return 0;