From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 9F90682358 for ; Wed, 21 Dec 2016 21:15:08 -0800 (PST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 21 Dec 2016 21:15:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,386,1477983600"; d="scan'208";a="42366107" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga004.jf.intel.com with ESMTP; 21 Dec 2016 21:15:08 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 21 Dec 2016 21:15:08 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.132]) with mapi id 14.03.0248.002; Thu, 22 Dec 2016 13:15:06 +0800 From: "Long, Qin" To: "Yao, Jiewen" , "edk2-devel@lists.01.org" CC: "Zhang, Chao B" Thread-Topic: [PATCH 2/2] SignedCapsulePkg/SystemCapsuleLib: Add ASSERT check for PCD Thread-Index: AQHSXBBiG0X5GN1Fd0Kn2I1HsiExZKETbIIQ Date: Thu, 22 Dec 2016 05:15:05 +0000 Message-ID: References: <1482382829-12168-1-git-send-email-jiewen.yao@intel.com> <1482382829-12168-3-git-send-email-jiewen.yao@intel.com> In-Reply-To: <1482382829-12168-3-git-send-email-jiewen.yao@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 2/2] SignedCapsulePkg/SystemCapsuleLib: Add ASSERT check for PCD X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2016 05:15:08 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Qin Long > -----Original Message----- > From: Yao, Jiewen > Sent: Thursday, December 22, 2016 1:00 PM > To: edk2-devel@lists.01.org > Cc: Zhang, Chao B; Long, Qin > Subject: [PATCH 2/2] SignedCapsulePkg/SystemCapsuleLib: Add ASSERT > check for PCD >=20 > Add ASSERT check for PCD to avoid platform mis-configuration. >=20 > Cc: Chao Zhang > Cc: Qin Long > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Jiewen Yao > --- > SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c | > 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git > a/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c > b/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c > index 27c6f4c..1820551 100644 > --- > a/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c > +++ > b/SignedCapsulePkg/Library/EdkiiSystemCapsuleLib/EdkiiSystemCapsuleLib.c > @@ -415,6 +415,8 @@ ExtractAuthenticatedImage ( > } else { > return FALSE; > } > + ASSERT (PublicKeyData !=3D NULL); > + ASSERT (PublicKeyDataLength !=3D 0); >=20 > Status =3D AuthenticateFmpImage( > ImageAuth, > -- > 2.7.4.windows.1