diff options
Diffstat (limited to 'subprojects')
-rw-r--r-- | subprojects/libvduse/libvduse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c index 1a5981445c..e089d4d546 100644 --- a/subprojects/libvduse/libvduse.c +++ b/subprojects/libvduse/libvduse.c @@ -1309,8 +1309,8 @@ VduseDev *vduse_dev_create(const char *name, uint32_t device_id, goto err_dev; } - strncpy(dev_config->name, name, VDUSE_NAME_MAX); - dev_config->name[VDUSE_NAME_MAX - 1] = '\0'; + assert(!vduse_name_is_invalid(name)); + strcpy(dev_config->name, name); dev_config->device_id = device_id; dev_config->vendor_id = vendor_id; dev_config->features = features; |