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 37A4EA0572 for ; Tue, 28 Jun 2022 15:11:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2F1B9410EE; Tue, 28 Jun 2022 15:11:20 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 3EE51400D7; Tue, 28 Jun 2022 15:11:17 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25SAC9wj020910; Tue, 28 Jun 2022 06:11:16 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=JT65lOElZ2pWogu4QIUFEm0zdaxc0JP8iAk9hUsV9uc=; b=HQ+VHye5gx+eodm09huXpBQ0pfVTDahzxsa2O7fCCLUXMqA5kQQyuX104gEsIQHGH3+2 HcU6QVb0u28vyTc1GO+w3tNYU0nZrL8EeiTDXqHBCHCRm6tM9fdrHmNamg7WRZU/4fn8 i+zBt+eVx0cHomQ1ES0nNUTDq8w4VHqwcBJiWz/On4FDAoo/M0tqV3JWHN5s0FgorNkx 7GE6VDHuDBjCwbF5ozSwLeaiyM/RT0et5TDB/ScBSAKATzqpKYmCLRopU23GLR7Xux8F fiUYMvWn/0ifkPLcqZqbljgbJH/CqIkLdiHmrQWVwapb4n8L8Eg5b7z3ySW3wcwpGzYL 6w== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3gyxcq12nw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 28 Jun 2022 06:11:16 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 28 Jun 2022 06:11:14 -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.18 via Frontend Transport; Tue, 28 Jun 2022 06:11:14 -0700 Received: from localhost.localdomain (unknown [10.28.34.38]) by maili.marvell.com (Postfix) with ESMTP id 3749B3F7092; Tue, 28 Jun 2022 06:11:11 -0700 (PDT) From: Gowrishankar Muthukrishnan To: CC: Fan Zhang , Brian Dooley , Anoob Joseph , "Archana Muniganti" , Jerin Jacob , Gowrishankar Muthukrishnan , Subject: [PATCH v2] example/fips_validation: handle empty payload Date: Tue, 28 Jun 2022 18:41:09 +0530 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: <0557079b1aa7fd8450adb2e28b03817016be4cad.1656402940.git.gmuthukrishn@marvell.com> References: <0557079b1aa7fd8450adb2e28b03817016be4cad.1656402940.git.gmuthukrishn@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: rFJMEF_bmpqyfMGPGw6x4RHROcawpzc8 X-Proofpoint-ORIG-GUID: rFJMEF_bmpqyfMGPGw6x4RHROcawpzc8 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-06-28_07,2022-06-28_01,2022-06-22_01 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 Allocate at least onebyte to handle empty payload in a test vector when defined. Fixes: 3d0fad56b74 ("examples/fips_validation: add crypto FIPS application") Cc: stable@dpdk.org Signed-off-by: Gowrishankar Muthukrishnan --- v2: - commit message corrections. --- examples/fips_validation/fips_validation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c index 94e31abf83..324abccb14 100644 --- a/examples/fips_validation/fips_validation.c +++ b/examples/fips_validation/fips_validation.c @@ -630,7 +630,7 @@ parse_uint8_hex_str(const char *key, char *src, struct fips_val *val) val->val = NULL; } - val->val = rte_zmalloc(NULL, len, 0); + val->val = rte_zmalloc(NULL, len + 1, 0); if (!val->val) return -ENOMEM; -- 2.25.1