From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 82552A2EFC for ; Thu, 19 Sep 2019 13:55:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 964831EFBF; Thu, 19 Sep 2019 13:54:33 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 40B411EF77; Thu, 19 Sep 2019 13:54:23 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x8JBohWn028434; Thu, 19 Sep 2019 04:54:22 -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=pfpt0818; bh=3+RauN2gJaPKi11TgOH5fMKg5Q8d70oICM1gRjGSgNI=; b=l2xQeg9xVIZjMvvKOJ46hvW6X2b5TXvlRoxK1DTIXrUAorWY3sR5p8EOK844o6PLF0WN C/3vIUf/nw+IUNLZIBlEgaedA3qScdF2ZyEgKIJG451u2895w6/JIn8PVRChG72yXcjd 65ZSSOx8UOf5K0aZeeqfYYK4XiZTB+V9r6AnJ6TV350vFO5+ddtghYwZLv2n7RIYjjHp CZWigPL1O+c9jZIWeC1nijIBCHPEM5l3+lSsnWeWjae7qRLpc+ZgqREWcGUPs46AjMJb /QC8FQhXAEJpM3jhdk3zJUPQbZIPHU4m5pYLQqgqD+a9kRzeW7pCejJLgpsT+Hz6kzkG GQ== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2v3vcfjn5e-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 19 Sep 2019 04:54:22 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 19 Sep 2019 04:54:20 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Thu, 19 Sep 2019 04:54:20 -0700 Received: from vvenus375.il.marvell.com (unknown [10.5.120.75]) by maili.marvell.com (Postfix) with ESMTP id A4CD73F7041; Thu, 19 Sep 2019 04:54:18 -0700 (PDT) From: To: CC: , , , , Date: Thu, 19 Sep 2019 15:12:32 +0300 Message-ID: <20190919121232.4864-9-michaelsh@marvell.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190919121232.4864-1-michaelsh@marvell.com> References: <20190919121232.4864-1-michaelsh@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.70,1.0.8 definitions=2019-09-19_04:2019-09-19,2019-09-19 signatures=0 Subject: [dpdk-dev] [PATCH 8/8] examples/fips_validation: fix plain text overwrite X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Michael Shamis fix erroneous overwrite of PLAINTEXT-line after [DECRYPT] tag Signed-off-by: Michael Shamis --- examples/fips_validation/fips_validation.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/fips_validation/fips_validation.c b/examples/fips_validation/fips_validation.c index 4dde482e5..3ab7f8508 100644 --- a/examples/fips_validation/fips_validation.c +++ b/examples/fips_validation/fips_validation.c @@ -400,10 +400,13 @@ fips_test_parse_one_case(void) } if (is_interim) { - for (i = 0; i < info.nb_vec_lines; i++) - fprintf(info.fp_wr, "%s\n", info.vec[i]); - fprintf(info.fp_wr, "\n"); - return 1; + if (!(strstr(info.vec[0], "DECRYPT") && + info.nb_vec_lines > 1)) { + for (i = 0; i < info.nb_vec_lines; i++) + fprintf(info.fp_wr, "%s\n", info.vec[i]); + fprintf(info.fp_wr, "\n"); + return 1; + } } for (i = 0; i < info.nb_vec_lines; i++) { -- 2.23.0