From patchwork Mon Aug 26 09:41:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Shamis X-Patchwork-Id: 57895 X-Patchwork-Delegate: gakhil@marvell.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CA3381BFFE; Mon, 26 Aug 2019 11:24:18 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 4B19C1BFC6 for ; Mon, 26 Aug 2019 11:24:13 +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 x7Q9JYsM020142; Mon, 26 Aug 2019 02:24:12 -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=evswwtg7DacRVgg3KI4kvRz9n6M7gamD2I9ujWtf8gM=; b=WzEtZgzRVRBJ0RFnMGve86++eUIhQq41BOu4rFFyIT2fP8FYcgtS+C64H8yQrBzDtKto 6WhiRu5ob2fz9iIH8oQ2eGMLLrGB8FF9eLTDxWbEBuzZhTssJmtmILrTCDDYIE3R4Pwx CSjzkv1ipPDVpBnP6CitIq8DVXAUenFX9LYAmI0GOqUhShakm4BROF2AJUPGb2/Lt9pO ZyF0qyMTCJcN3GpV+ixdVr4qa538BYtv8QUN77rHmx9QftVwkAuPENkcmHvB5l2oi9LI knf4kytkucS4q1C8KlcvSdSiuBzStYN/Q3uAEM1Zfr/q5/X1CzJzgtvSmvScfDNoqyDN EQ== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2uk4rke1jm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 26 Aug 2019 02:24:12 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Mon, 26 Aug 2019 02:24:11 -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; Mon, 26 Aug 2019 02:24:10 -0700 Received: from vvenus375.il.marvell.com (unknown [10.5.120.75]) by maili.marvell.com (Postfix) with ESMTP id 01D3B3F7041; Mon, 26 Aug 2019 02:24:08 -0700 (PDT) From: To: CC: , , Date: Mon, 26 Aug 2019 12:41:20 +0300 Message-ID: <20190826094120.22590-13-michaelsh@marvell.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20190826094120.22590-1-michaelsh@marvell.com> References: <20190826094120.22590-1-michaelsh@marvell.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-26_06:2019-08-23,2019-08-26 signatures=0 Subject: [dpdk-dev] [PATCH 12/12] examples/fips: erroneous overwrite of PLAINTEXT after DECRYPT 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 fcc0c985d..4d0f240b8 100644 --- a/examples/fips_validation/fips_validation.c +++ b/examples/fips_validation/fips_validation.c @@ -401,10 +401,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++) {