Skip to contentSkip to conversation

test/crypto: add null check for ZUC authentication op

PATCH Applied Ciara Power 3 participants 3 messages May 11, 2022

lore
Share & tools
lore
#0 lore raw

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.

Fixes 4c99481 ("app/test: add ZUC")
---
 app/test/test_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
app/test/test_cryptodev.c +1 -1
index f444144cc6..4ffaadc008 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
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.

Fixes 4c99481 ("app/test: add ZUC")
Applied
#2 lore raw
Quoted 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
Fixes 4c99481 ("app/test: add ZUC")

Applied to dpdk-next-crypto

Changed subject
test/crypto: fix null check for ZUC authentication op