vlib: allocate pci product_name with vec_alloc 08/34308/1
authorRay Kinsella <mdr@ashroe.eu>
Tue, 2 Nov 2021 13:18:49 +0000 (13:18 +0000)
committerRay Kinsella <mdr@ashroe.eu>
Tue, 2 Nov 2021 14:13:14 +0000 (14:13 +0000)
commit7d0ca6af0050f25e5a250d1078af8340f302bc09
tree4dd76f16744c7157a993b818a6b0bd03c1e72812
parent60706a2869919d32636e0bea8348d4175a905295
vlib: allocate pci product_name with vec_alloc

The pci device product_name array was being allocated with vec_validate, not
vec_alloc. This was allocating an additional byte at the end of the array, which
was causing a spurious '\0' to be returned in the middle of format strings.

Type: fix
Fixes: cef87f1a5e

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I21e0aa4f0455ee03bd0acc675d0deae02eddea2b
src/vlib/linux/pci.c