From patchwork Mon Feb 6 14:46:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gowrishankar Muthukrishnan X-Patchwork-Id: 123153 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 28C1B41C12; Mon, 6 Feb 2023 15:47:26 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 361ED42BD9; Mon, 6 Feb 2023 15:46:47 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 70B5C42D6D for ; Mon, 6 Feb 2023 15:46:43 +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 3167uqkA017823; Mon, 6 Feb 2023 06:46:42 -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=bSk7UKbAIOLyrTYrJxmbDTTspoWf3ueZteE/bnjzmfElAprHLg7vr8GrmTDhI34fp4QP yjQalfDDfAXpZruczX/FImQvNHtgAbnbiJiGTpGHdBwAz4JA4LvEQOXXiW8FQaJxrJqR n67jg2LT8KWTDfsA57oxJUdNSDS4lF23sWwDFrUBCS92E2NhQJIOpISerwDh6Pj3EZo2 1saqol84/tar89wMOjS5w6tx2ywhHZ4u/05a1EvPT0yY8OQ6hno1ixqmeXT/s58Cnc6e 2cv/riyxE+iRqDRfPIBiE0iDoW1a5oYvmmZQstjxLRzMBrsvSSnLPEvUXNG/wq3HTMtl FQ== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3nhqrtbkec-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 06 Feb 2023 06:46:42 -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; Mon, 6 Feb 2023 06:46:35 -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; Mon, 6 Feb 2023 06:46:35 -0800 Received: from localhost.localdomain (unknown [10.28.34.38]) by maili.marvell.com (Postfix) with ESMTP id B03463F7043; Mon, 6 Feb 2023 06:46:33 -0800 (PST) From: Gowrishankar Muthukrishnan To: CC: Anoob Joseph , , Akhil Goyal , Brian Dooley , "Gowrishankar Muthukrishnan" Subject: [v1, 10/10] examples/fips_validation: add extra space in JSON buffer Date: Mon, 6 Feb 2023 20:16:02 +0530 Message-ID: <311e28cd27874f1d75c36b5825425e6f84889d64.1675693844.git.gmuthukrishn@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 X-Proofpoint-GUID: OKEabUPg7zKl3y3gI9gddFgMB7blmuC7 X-Proofpoint-ORIG-GUID: OKEabUPg7zKl3y3gI9gddFgMB7blmuC7 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-06_07,2023-02-06_03,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 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 Acked-by: Brian Dooley --- 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 */