X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fpci.c;h=ab1442248a820916b1aa286702f6afcd5b0ecbcb;hp=6583fb000cdf577ce2e2bbf51d5f62f2f56f56a2;hb=d22c11cec4e8c3390bfe6bf16ed07f5d073f0d4a;hpb=f240f8a3c11478abe180bd906c746c68eb8c3a3c diff --git a/palacios/src/devices/pci.c b/palacios/src/devices/pci.c index 6583fb0..ab14422 100644 --- a/palacios/src/devices/pci.c +++ b/palacios/src/devices/pci.c @@ -1637,6 +1637,7 @@ struct pci_device * v3_pci_register_device(struct vm_device * pci, pci_dev->fn_num = fn_num; strncpy(pci_dev->name, name, sizeof(pci_dev->name)); + pci_dev->name[sizeof(pci_dev->name)-1] = 0; pci_dev->vm = pci->vm; pci_dev->priv_data = priv_data;