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 CDAC242E49; Tue, 11 Jul 2023 20:49:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6303B40A7D; Tue, 11 Jul 2023 20:49:06 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 2D66D4003C for ; Tue, 11 Jul 2023 20:49:05 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36BH8srV021726; Tue, 11 Jul 2023 11:49:04 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=QHgZ9T3NN9G/OHknWsvft+gXWBgdXKMCX4YNmgo/l8w=; b=DGmJ+veB6lgcaLpJ5PtVCH8wfr8+X6I2cFdRK3Nc2/g2LCuXbnEk1T8203umWmTxUmEw 22dSWerfoMO9/MOO8RrvI2yrU2OptCK6IbRHj6npY/dL6RhU84oJKaU9TkjHw3zj/vwL 6wN8D/jdbSBGfJyp2FneSqlJr5ALvyad7Cvp137WsJX7MZXsEj3CIuQ/HFoU2K2nZi2F Ey5v3TaBHRK8jFjxiOW5hL7VI1urkRqar47AbQXMvYXLgyAb53cuiRp1IiKcpd2NAM/Q o1eYyFHOynhibyKqCq63EWpqbyPsH/7eqNXEVqXb608d+7lwZ4qqBCxPjMIf8wz8DJtR Vg== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3rsb7r8dsr-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 11 Jul 2023 11:49:04 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 11 Jul 2023 11:49:02 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 11 Jul 2023 11:49:02 -0700 Received: from BG-LT91401.marvell.com (BG-LT91401.marvell.com [10.28.175.191]) by maili.marvell.com (Postfix) with ESMTP id 63EB53F709B; Tue, 11 Jul 2023 11:49:00 -0700 (PDT) From: Gowrishankar Muthukrishnan To: CC: , Akhil Goyal , Kai Ji , , Gowrishankar Muthukrishnan Subject: [PATCH] crypto/openssl: fix segfault due to uninitialized var Date: Wed, 12 Jul 2023 00:18:57 +0530 Message-ID: <0ce047dd9078d486ab7a317185fa1e0118c79299.1689100664.git.gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: bpMzqGYolK4PSaLjpmWoempv3AwtMcXl X-Proofpoint-ORIG-GUID: bpMzqGYolK4PSaLjpmWoempv3AwtMcXl X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-11_10,2023-07-11_01,2023-05-22_02 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 In some openSSL 3 libraries, uninitialized output variable cause segfault. It is always nice to initialize it. Fixes: 3b7d638fb11f ("crypto/openssl: support asymmetric SM2") Bugzilla ID: 1250 Signed-off-by: Gowrishankar Muthukrishnan --- drivers/crypto/openssl/rte_openssl_pmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c index 4569c5e62f..5e8624cebe 100644 --- a/drivers/crypto/openssl/rte_openssl_pmd.c +++ b/drivers/crypto/openssl/rte_openssl_pmd.c @@ -2734,7 +2734,7 @@ process_openssl_sm2_op_evp(struct rte_crypto_op *cop, case RTE_CRYPTO_ASYM_OP_ENCRYPT: { OSSL_PARAM *eparams = sess->u.sm2.params; - size_t output_len; + size_t output_len = 0; kctx = EVP_PKEY_CTX_new_id(EVP_PKEY_SM2, NULL); if (kctx == NULL || EVP_PKEY_fromdata_init(kctx) <= 0 || -- 2.25.1