Skip to content

Commit

Permalink
test/crypto: fix null check for ZUC authentication
Browse files Browse the repository at this point in the history
[ upstream commit e6d37ff ]

Check if the returned op is NULL because of failure,
before using it and causing a segmentation fault.

Fixes: 4c99481 ("app/test: add ZUC")

Signed-off-by: Ciara Power <ciara.power@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
  • Loading branch information
ciarapow authored and kevintraynor committed Jun 8, 2022
1 parent 0b9e45d commit 877eae4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/test/test_cryptodev.c
Expand Up @@ -6233,8 +6233,8 @@ test_zuc_authentication(const struct wireless_test_data *tdata)
else
ut_params->op = process_crypto_request(ts_params->valid_devs[0],
ut_params->op);
ut_params->obuf = ut_params->op->sym->m_src;
TEST_ASSERT_NOT_NULL(ut_params->op, "failed to retrieve obuf");
ut_params->obuf = ut_params->op->sym->m_src;
ut_params->digest = rte_pktmbuf_mtod(ut_params->obuf, uint8_t *)
+ plaintext_pad_len;

Expand Down

0 comments on commit 877eae4

Please sign in to comment.