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 B8C4EA0547; Tue, 28 Jun 2022 09:58:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F81840691; Tue, 28 Jun 2022 09:58:40 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 1A446400D7; Tue, 28 Jun 2022 09:58:38 +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 25S3h64T031654; Tue, 28 Jun 2022 00:58:37 -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=/CjZqh1GXnKe/3WPm2HeOLYZ6sKG5gr0nFOHVTCEA6k=; b=RHkIF7SBHx1Ius8SEBp7A5OJG4xL5AewWYWOC5wcXFy+QDO3AajnsbGzLIK17HzWFJVd HmTt80cUnEKvoHOAqiouO9LxAGQyJ6FhkhJTajZQWvPd1j8iV8evKuP9a3c4ZbfgVPfp AWdbFK8rDhfqmK9aNLh2FK/HqFhf+H/6e/bxXW3+eMZKe+Y0p9wwtewAP9B5GtdsnmtJ voWXJInyjI3GsShsZXHmQjb3zEiFEQZonPJ/Vhmri94snAks2f6fp/hNSlgBzJUNgIud esz/3NrkcLVukP1cnVEjxD4Jh2dO2IWtsRwkM1Rv7Zznwjo3B12hjzNwMknqf4jxENF2 +g== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3gyh22tx10-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 28 Jun 2022 00:58:37 -0700 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Tue, 28 Jun 2022 00:58:36 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 28 Jun 2022 00:58:36 -0700 Received: from localhost.localdomain (unknown [10.28.34.38]) by maili.marvell.com (Postfix) with ESMTP id 622FC3F7054; Tue, 28 Jun 2022 00:58:33 -0700 (PDT) From: Gowrishankar Muthukrishnan To: CC: Fan Zhang , Brian Dooley , Anoob Joseph , "Archana Muniganti" , Jerin Jacob , Gowrishankar Muthukrishnan , Subject: [PATCH v1] example/fips_validation: handle empty payload Date: Tue, 28 Jun 2022 13:28:30 +0530 Message-ID: <0557079b1aa7fd8450adb2e28b03817016be4cad.1656402940.git.gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-GUID: LgdJzWgVTR6ZlKexBavJ-lYAzB4gIN9P X-Proofpoint-ORIG-GUID: LgdJzWgVTR6ZlKexBavJ-lYAzB4gIN9P 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-27_09,2022-06-24_01,2022-06-22_01 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 Allocate atleast 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 --- 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