git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
vhost: fix name not null terminated
[dpdk.git]
/
lib
/
librte_vhost
/
virtio-net.c
diff --git
a/lib/librte_vhost/virtio-net.c
b/lib/librte_vhost/virtio-net.c
index
d870ad9
..
f4695af
100644
(file)
--- a/
lib/librte_vhost/virtio-net.c
+++ b/
lib/librte_vhost/virtio-net.c
@@
-320,6
+320,7
@@
vhost_set_ifname(struct vhost_device_ctx ctx,
sizeof(dev->ifname) : if_len;
strncpy(dev->ifname, if_name, len);
+ dev->ifname[sizeof(dev->ifname) - 1] = '\0';
}