numam-dpdk/examples/ioat
Bruce Richardson 1fe0bd0acd examples/ioat: fix possible null dereference
When searching for raw devices with the correct type, we check the driver
name using strcmp, without first checking that the call to info get
succeeded and assigned a value to that pointer.

If the call to get the device info fails, we can treat it as if the device
didn't match, and continue the loop, so the easiest fix is just to skip the
strcmp if the driver_name is null. [A non-null value from a previous failed
match is ok as it too causes the same behaviour of another loop iteration].

Coverity issue: 350353
Fixes: 2328542ed8 ("examples/ioat: add rawdev copy mode")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
2019-11-26 17:26:08 +01:00
..
ioatfwd.c examples/ioat: fix possible null dereference 2019-11-26 17:26:08 +01:00
Makefile examples: hide error for missing pkg-config path flag 2019-11-20 22:48:32 +01:00
meson.build examples/ioat: add new sample app for ioat driver 2019-10-27 17:57:41 +01:00