diff options
author | Ray Kinsella <mdr@ashroe.eu> | 2021-11-03 09:13:41 +0000 |
---|---|---|
committer | Matthew Smith <mgsmith@netgate.com> | 2021-11-03 17:25:20 +0000 |
commit | 03d0fbe3c11c8d21c347979e30b7bdcf232536aa (patch) | |
tree | 4fba98a28cdb151dfba6cea4d89cf81871b468ec | |
parent | 4739c8833e2e8013417ef0e52610d8b310e97a93 (diff) |
pci: allocate and set length pci product name
Original fix for this issue, allocated sufficent memory but didn't set the
vector length correctly.
Type: fix
Fixes: 7d0ca6af0
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I3c8ce310d7a6266840a2d8d6b8620254acd042ab
-rw-r--r-- | src/vlib/linux/pci.c | 2 |
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) { |