From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.115; helo=mga14.intel.com; envelope-from=chao.b.zhang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AF2C72034B43D for ; Wed, 27 Dec 2017 17:52:02 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 Dec 2017 17:56:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,468,1508828400"; d="scan'208";a="15615318" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga003.jf.intel.com with ESMTP; 27 Dec 2017 17:56:58 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 27 Dec 2017 17:56:56 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 27 Dec 2017 17:56:56 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.159]) by shsmsx102.ccr.corp.intel.com ([169.254.2.189]) with mapi id 14.03.0319.002; Thu, 28 Dec 2017 09:56:54 +0800 From: "Zhang, Chao B" To: "Gao, Liming" , "edk2-devel@lists.01.org" CC: "Long, Qin" Thread-Topic: [edk2] [Patch 4/4] SecurityPkg: Convert source file to DOS format Thread-Index: AQHTfya1WHB+WPxbekmiM0MRsCI5MqNX/94Q Date: Thu, 28 Dec 2017 01:56:53 +0000 Message-ID: References: <20171227152320.12428-1-liming.gao@intel.com> <20171227152320.12428-5-liming.gao@intel.com> In-Reply-To: <20171227152320.12428-5-liming.gao@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2U5ZGUxNDQtYjlmZi00MTgxLTlmMmYtZmI1MWExZTY5NjQ5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJuK0EyY1J2NGVmaGR4NjdcL3RCU3pCN3NQVjFVbkc5U01xQkdBazV5RFpvN1ZOSk9wa2pnVWhIbUd3MWJyUGRnZyJ9 dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch 4/4] SecurityPkg: Convert source file to DOS format X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Dec 2017 01:52:03 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by : Chao Zhang -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Limi= ng Gao Sent: Wednesday, December 27, 2017 11:23 PM To: edk2-devel@lists.01.org Cc: Long, Qin Subject: [edk2] [Patch 4/4] SecurityPkg: Convert source file to DOS format Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Qin Long --- .../SecureBootConfigDxe/SecureBootConfigImpl.c | 26 +++++++++++-------= ---- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBo= otConfigImpl.c b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/Secu= reBootConfigImpl.c index 4ec0f8d13a..e3066f77be 100644 --- a/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfi= gImpl.c +++ b/SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootCo +++ nfigImpl.c @@ -3145,9 +3145,9 @@ DeleteSignatureEx ( if (DelType =3D=3D Delete_Signature_List_All) { VariableDataSize =3D 0; } else { - // - // Traverse to target EFI_SIGNATURE_LIST but others will be skipped. - // + // + // Traverse to target EFI_SIGNATURE_LIST but others will be skipped. + // while ((RemainingSize > 0) && (RemainingSize >=3D ListWalker->Signatur= eListSize) && ListIndex < PrivateData->ListIndex) { CopyMem ((UINT8 *)NewVariableData + Offset, ListWalker, ListWalker->= SignatureListSize); Offset +=3D ListWalker->SignatureListSize; @@ -3157,17 +3157,17 @@ D= eleteSignatureEx ( ListIndex++; } =20 - // - // Handle the target EFI_SIGNATURE_LIST. - // If CheckedCount =3D=3D SIGNATURE_DATA_COUNTS (ListWalker) or DelTy= pe =3D=3D Delete_Signature_List_One - // it means delete the whole EFI_SIGNATURE_LIST, So we just skip this= EFI_SIGNATURE_LIST. - // - if (CheckedCount < SIGNATURE_DATA_COUNTS (ListWalker) && DelType =3D= =3D Delete_Signature_Data) { + // + // Handle the target EFI_SIGNATURE_LIST. + // If CheckedCount =3D=3D SIGNATURE_DATA_COUNTS (ListWalker) or DelTy= pe =3D=3D Delete_Signature_List_One + // it means delete the whole EFI_SIGNATURE_LIST, So we just skip this= EFI_SIGNATURE_LIST. + // + if (CheckedCount < SIGNATURE_DATA_COUNTS (ListWalker) && DelType =3D= =3D=20 + Delete_Signature_Data) { NewCertList =3D (EFI_SIGNATURE_LIST *)(NewVariableData + Offset); // // Copy header. // - CopyMem ((UINT8 *)NewVariableData + Offset, ListWalker, sizeof (EFI_= SIGNATURE_LIST) + ListWalker->SignatureHeaderSize); + CopyMem ((UINT8 *)NewVariableData + Offset, ListWalker, sizeof=20 + (EFI_SIGNATURE_LIST) + ListWalker->SignatureHeaderSize); Offset +=3D sizeof (EFI_SIGNATURE_LIST) + ListWalker->SignatureHeade= rSize; =20 DataWalker =3D (EFI_SIGNATURE_DATA *)((UINT8 *)ListWalker + sizeof(E= FI_SIGNATURE_LIST) + ListWalker->SignatureHeaderSize); @@ -3188,9 +3188,9 @= @ DeleteSignatureEx ( } } =20 - RemainingSize -=3D ListWalker->SignatureListSize; - ListWalker =3D (EFI_SIGNATURE_LIST *)((UINT8 *)ListWalker + ListWalker= ->SignatureListSize); - + RemainingSize -=3D ListWalker->SignatureListSize; + ListWalker =3D (EFI_SIGNATURE_LIST *)((UINT8 *)ListWalker +=20 + ListWalker->SignatureListSize); + // // Copy remaining data, maybe 0. // -- 2.11.0.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel