From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ED6EAA0093 for ; Wed, 11 May 2022 15:29:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E379842819; Wed, 11 May 2022 15:29:33 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 88B2E406B4; Wed, 11 May 2022 15:29:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652275771; x=1683811771; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=HsjFr6roSjDFUhmSwWOvOkghcrHGu0JOjGjmVuVV6+w=; b=iUPZs3MsxRqn88rkoWXpQ2zN+L54jaPgPgbBZ5IBfwMOTPSrpUX8DhXq MkHOWGAKrpUlGx6aXbAhjTV35kuDq5thB1JeBLJP+YVdHO8coaeM4wUyW u1X9d97E3Rzfo6LQeNx47NJSzG2WDWS/D/JKtlKe91EUjOC5Z+dyibjGU Rh/WtqEQxHsWrWyKXrLKt6joWhutS5n9Sh94o/oRu+OM46+wmPL76rueS X2fBM0PgDb2tuYPFv2p1mjoZb7VnfdjoWsQ4JHVp31yP9qevvoQe2aQzR 0rtqaKR8JCwtn8lo9g4zg/VMMzUOaVqo58oXVJ0Kzi7T7ZweAboR0zD5Q A==; X-IronPort-AV: E=McAfee;i="6400,9594,10343"; a="269829407" X-IronPort-AV: E=Sophos;i="5.91,217,1647327600"; d="scan'208";a="269829407" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 06:29:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,217,1647327600"; d="scan'208";a="566180077" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.222.49]) by orsmga007.jf.intel.com with ESMTP; 11 May 2022 06:29:27 -0700 From: Ciara Power To: dev@dpdk.org Cc: roy.fan.zhang@intel.com, kai.ji@intel.com, Ciara Power , pablo.de.lara.guarch@intel.com, stable@dpdk.org, Akhil Goyal Subject: [PATCH] test/crypto: add null check for ZUC authentication op Date: Wed, 11 May 2022 13:29:24 +0000 Message-Id: <20220511132924.1163284-1-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 --- 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