raw/ifpga/base: fix use of untrusted scalar value
authorTianfei Zhang <tianfei.zhang@intel.com>
Fri, 21 Jun 2019 08:40:13 +0000 (16:40 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 4 Jul 2019 13:30:52 +0000 (15:30 +0200)
commit8234347f999daed5ddcbfd659260fed79abb537a
treeb5a2bd797e72364657239dfcecd859a2cbf3b902
parent7e30313f4124c0773546d354fee582a4611b56e6
raw/ifpga/base: fix use of untrusted scalar value

Add checking the buffer size and use
const char * for buffer declaration.

Coverity issue: 279449
Fixes: ef1e8ede ("raw/ifpga: add Intel FPGA bus rawdev driver")
Cc: stable@dpdk.org
Signed-off-by: Tianfei Zhang <tianfei.zhang@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
drivers/raw/ifpga_rawdev/base/ifpga_api.c
drivers/raw/ifpga_rawdev/base/ifpga_api.h
drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h
drivers/raw/ifpga_rawdev/base/ifpga_fme_pr.c
drivers/raw/ifpga_rawdev/base/opae_hw_api.c
drivers/raw/ifpga_rawdev/base/opae_hw_api.h
drivers/raw/ifpga_rawdev/ifpga_rawdev.c