raw/ifpga: terminate string filled by readlink with null
authorWei Huang <wei.huang@intel.com>
Fri, 30 Oct 2020 07:35:06 +0000 (03:35 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:07 +0000 (23:35 +0100)
commit5a906909af93c46941bf0c56a97af8f0b279d1d4
tree3c9b21752ba18feb1f3a13a9298ece2bc27f9452
parenta100fe47f9d7c4cbfa79f7d2628a1255d7d0996d
raw/ifpga: terminate string filled by readlink with null

readlink() does not terminate string, add a null character at the end
of the string if readlink() succeeds.

Coverity issue: 362820
Fixes: 9c006c45d0c5 ("raw/ifpga: scan PCIe BDF device tree")
Cc: stable@dpdk.org
Signed-off-by: Wei Huang <wei.huang@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/raw/ifpga/ifpga_rawdev.c