From patchwork Tue Feb 28 17:28:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gowrishankar Muthukrishnan X-Patchwork-Id: 124591 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BF23C41D9F; Tue, 28 Feb 2023 18:30:21 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2FD7542D3B; Tue, 28 Feb 2023 18:29:41 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 425814113C for ; Tue, 28 Feb 2023 18:29:36 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 31SFkDSR023808; Tue, 28 Feb 2023 09:29:35 -0800 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=+JUP6wi6PyBPAQtFFAK2MxLqWC858u3jCQUz5L1pi2I=; b=ITt5bLbPDBgsaMCZVaqxjQFyb0E2teqj/UhnK/ohN++7SXiKlqOcIQH6PeIhZZtFeTqG NSNQ5TVoSt777UXUTJgizbhGL9jenR3NJHr6REmeJD2YM6QETerRi0XyquEBRO6mnLnQ E4yiR2I+3JPuUKyztnir3u5rtnw6oUQim1WPefo6/96ADJl96EHIAtXN4AV/ihXYAARg irjmqpag/r4RomyzJ55+rZB2x2bVk27dBD0nttPdslelZV8pOsDFKK+JeqB2UxmtGtu6 yY5YZiC8s02TEA9axIrLAroH1L0noeP6MlivaLZaXGan49aB1dzo50rOucoLsjHEvQ3/ sQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3nyjqty0qx-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 28 Feb 2023 09:29:35 -0800 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.42; Tue, 28 Feb 2023 09:29:26 -0800 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.42 via Frontend Transport; Tue, 28 Feb 2023 09:29:26 -0800 Received: from localhost.localdomain (unknown [10.28.34.38]) by maili.marvell.com (Postfix) with ESMTP id 1B6AC5B6944; Tue, 28 Feb 2023 09:29:23 -0800 (PST) From: Gowrishankar Muthukrishnan To: CC: Anoob Joseph , , Akhil Goyal , Brian Dooley , "Gowrishankar Muthukrishnan" Subject: [v2, 10/10] examples/fips_validation: add extra space in JSON buffer Date: Tue, 28 Feb 2023 22:58:56 +0530 Message-ID: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: O0VJNPqdMjSOpjwnKLrc0JnkG2m6hclV X-Proofpoint-GUID: O0VJNPqdMjSOpjwnKLrc0JnkG2m6hclV X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-02-28_15,2023-02-28_03,2023-02-09_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 Current test buffer to copy input data of maximum possible length did not account NULL character, due to which a last input character is always ignored and it causes tests like RSA SIGVER for modulo of 4096 bits to fail. This patch fixes it. Fixes: 0b65d54f3a4 ("examples/fips_validation: fix JSON buffer size") Signed-off-by: Gowrishankar Muthukrishnan --- examples/fips_validation/fips_validation.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/fips_validation/fips_validation.h b/examples/fips_validation/fips_validation.h index c4988053c1..abc1d64742 100644 --- a/examples/fips_validation/fips_validation.h +++ b/examples/fips_validation/fips_validation.h @@ -247,7 +247,7 @@ struct ecdsa_interim_data { * Esp, in asym op, modulo bits decide char buffer size. * max = (modulo / 4) */ -#define FIPS_TEST_JSON_BUF_LEN (4096 / 4) +#define FIPS_TEST_JSON_BUF_LEN ((4096 / 4) + 1) struct fips_test_json_info { /* Information used for reading from json */