patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH] test/crypto: add null check for ZUC authentication op
@ 2022-05-11 13:29 Ciara Power
  2022-05-11 14:25 ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: Ciara Power @ 2022-05-11 13:29 UTC (permalink / raw)
  To: dev
  Cc: roy.fan.zhang, kai.ji, Ciara Power, pablo.de.lara.guarch, stable,
	Akhil Goyal

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

Fixes: 4c99481 ("app/test: add ZUC")
Cc: pablo.de.lara.guarch@intel.com
Cc: stable@dpdk.org

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 app/test/test_cryptodev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index f444144cc6..4ffaadc008 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -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;
 
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-11 20:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 13:29 [PATCH] test/crypto: add null check for ZUC authentication op Ciara Power
2022-05-11 14:25 ` De Lara Guarch, Pablo
2022-05-11 20:00   ` Akhil Goyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).