summaryrefslogtreecommitdiffstats
path: root/src/vlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlib')
-rw-r--r--src/vlib/linux/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/linux/pci.c b/src/vlib/linux/pci.c
index d968fe26695..5e539159fb9 100644
--- a/src/vlib/linux/pci.c
+++ b/src/vlib/linux/pci.c
@@ -348,7 +348,7 @@ vlib_pci_get_device_info (vlib_main_t * vm, vlib_pci_addr_t * addr,
break;
len = (tag[2] << 8) | tag[1];
- vec_alloc (data, len);
+ vec_validate (data, len - 1);
if (read (fd, data, len) != len)
{