numam-dpdk/examples/fips_validation
Chaitanya Babu Talluri 75b3dddf95 examples/fips_validation: fix null dereferences
One issue caught by Coverity 343408
*deref_parm: Directly dereferencing parameter val->val.

In writeback_tdes_hex_str(), tmp_val is initialised to null.
tmp_val.val is updated only if keys are found.
If keys are not found,it doesn't fails but continues
to invoke writeback_hex_str(),where val->val is accessed
without null check.

The fix is to return the error,
if keys are not found in writeback_tdes_hex_str().

Coverity issue: 343408
Fixes: 527cbf3d5e ("examples/fips_validation: support TDES parsing")
Cc: stable@dpdk.org

Signed-off-by: Chaitanya Babu Talluri <tallurix.chaitanya.babu@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
2019-10-09 11:50:12 +02:00
..
fips_dev_self_test.c cryptodev: add feature flags to disable 2019-07-05 15:03:25 +02:00
fips_dev_self_test.h examples/fips_validation: add power on self test 2019-01-10 16:57:22 +01:00
fips_validation_aes.c examples/fips_validation: support TDES parsing 2018-11-02 12:26:06 +01:00
fips_validation_ccm.c examples/fips_validation: support CCM parsing 2018-11-02 12:26:06 +01:00
fips_validation_cmac.c examples/fips_validation: support CMAC parsing 2018-11-02 12:26:06 +01:00
fips_validation_gcm.c examples/fips_validation: support GCM parsing 2018-11-02 12:26:06 +01:00
fips_validation_hmac.c examples/fips_validation: support HMAC parsing 2018-11-02 12:26:06 +01:00
fips_validation_sha.c examples/fips_validation: support plain SHA 2019-03-22 15:54:24 +01:00
fips_validation_tdes.c examples/fips_validation: fix null dereferences 2019-10-09 11:50:12 +02:00
fips_validation.c examples/fips_validation: fix HMAC test 2019-04-18 16:01:28 +02:00
fips_validation.h examples/fips_validation: support plain SHA 2019-03-22 15:54:24 +01:00
main.c cryptodev: add feature flags to disable 2019-07-05 15:03:25 +02:00
Makefile examples: fix pkg-config detection with older make 2019-07-03 23:10:23 +02:00
meson.build examples/fips_validation: support plain SHA 2019-03-22 15:54:24 +01:00