raw/ifpga: use trusted buffer to free
authorWei Huang <wei.huang@intel.com>
Fri, 30 Oct 2020 07:35:07 +0000 (03:35 -0400)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 3 Nov 2020 22:35:07 +0000 (23:35 +0100)
commitceccbcd73829c495e148e3380de916ef4874c104
tree17a55409f6c5b3eceb745603c1524a88d0955e5d
parent5a906909af93c46941bf0c56a97af8f0b279d1d4
raw/ifpga: use trusted buffer to free

In rte_fpga_do_pr, calling function read() may taints argument buffer
which turn to an untrusted value as argument of rte_free().

Coverity issue: 279449
Fixes: ef1e8ede3da5 ("raw/ifpga: add Intel FPGA bus rawdev driver")
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