test/crypto: add null check for ZUC authentication op
PATCH 1/1 test/crypto: add null check for ZUC authentication op
Check if the returned op is NULL because of failure, before using it and causing a segmentation fault.
--- app/test/test_cryptodev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_cryptodev.c +1 -1
@@ -6238,8 +6238,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;
Signature · 1 line
2.25.1
Quoted 12 lines
-----Original Message-----
From: Power, Ciara <[email protected]>
Sent: Wednesday, May 11, 2022 2:29 PM
To: [email protected]
Cc: Zhang, Roy Fan <[email protected]>; Ji, Kai <[email protected]>; Power, Ciara <[email protected]>; De Lara Guarch, Pablo <[email protected]>; [email protected]; Akhil Goyal <[email protected]>
Subject: [PATCH] test/crypto: add null check for ZUC authentication op
Quoted 8 lines
Check if the returned op is NULL because of failure, before using it and causing a segmentation fault.
Signed-off-by Ciara Power <[email protected]>
Akhil Goyal
AppliedQuoted 6 lines
Quoted 3 lines
Subject: [PATCH] test/crypto: add null check for ZUC authentication op
Check if the returned op is NULL because of failure, before using it and causing
a
Quoted 2 lines
segmentation fault.
Quoted 7 lines
Quoted 5 lines
Signed-off-by Ciara Power <[email protected]>Acked-by Pablo de Lara <[email protected]>
Applied to dpdk-next-crypto
Changed subject
test/crypto: fix null check for ZUC authentication op