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 6492AA0C43; Wed, 20 Oct 2021 13:07:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2365340687; Wed, 20 Oct 2021 13:07:20 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id B83FB40142 for ; Wed, 20 Oct 2021 13:07:18 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10142"; a="227523331" X-IronPort-AV: E=Sophos;i="5.87,166,1631602800"; d="scan'208";a="227523331" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2021 04:06:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,166,1631602800"; d="scan'208";a="567528439" Received: from silpixa00400355.ir.intel.com (HELO silpixa00400355.ger.corp.intel.com) ([10.237.222.87]) by FMSMGA003.fm.intel.com with ESMTP; 20 Oct 2021 04:06:53 -0700 From: Ciara Power To: dev@dpdk.org Cc: roy.fan.zhang@intel.com, gakhil@marvell.com, pablo.de.lara.guarch@intel.com, thomas@monjalon.net, Ciara Power , piotrx.bronowski@intel.com Date: Wed, 20 Oct 2021 11:06:28 +0000 Message-Id: <20211020110628.689474-1-ciara.power@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] crypto/ipsec_mb: fix ZUC PMD buffer initialisation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The buffers used when processing a hash operation in the ZUC PMD should be initialised to empty before use. This fixes possible "may be used uninitialised" errors on compilation. Fixes: e09b92e6474b ("drivers/crypto: move zuc PMD to IPsec-mb framework") Cc: piotrx.bronowski@intel.com Signed-off-by: Ciara Power --- drivers/crypto/ipsec_mb/pmd_zuc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/ipsec_mb/pmd_zuc.c b/drivers/crypto/ipsec_mb/pmd_zuc.c index b542264069..2eae1d1ec7 100644 --- a/drivers/crypto/ipsec_mb/pmd_zuc.c +++ b/drivers/crypto/ipsec_mb/pmd_zuc.c @@ -138,11 +138,11 @@ process_zuc_hash_op(struct ipsec_mb_qp *qp, struct rte_crypto_op **ops, { unsigned int i; uint8_t processed_ops = 0; - uint8_t *src[ZUC_MAX_BURST]; + uint8_t *src[ZUC_MAX_BURST] = { 0 }; uint32_t *dst[ZUC_MAX_BURST]; - uint32_t length_in_bits[ZUC_MAX_BURST]; - uint8_t *iv[ZUC_MAX_BURST]; - const void *hash_keys[ZUC_MAX_BURST]; + uint32_t length_in_bits[ZUC_MAX_BURST] = { 0 }; + uint8_t *iv[ZUC_MAX_BURST] = { 0 }; + const void *hash_keys[ZUC_MAX_BURST] = { 0 }; struct zuc_session *sess; struct zuc_qp_data *qp_data = ipsec_mb_get_qp_private_data(qp); -- 2.25.1