From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 1167881D81 for ; Sun, 20 Nov 2016 23:57:38 -0800 (PST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga104.fm.intel.com with ESMTP; 20 Nov 2016 23:57:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,674,1473145200"; d="scan'208";a="1062235893" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 20 Nov 2016 23:57:37 -0800 Received: from fmsmsx151.amr.corp.intel.com (10.18.125.4) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 20 Nov 2016 23:57:37 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by FMSMSX151.amr.corp.intel.com (10.18.125.4) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 20 Nov 2016 23:57:36 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.239]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.138]) with mapi id 14.03.0248.002; Mon, 21 Nov 2016 15:57:36 +0800 From: "Yao, Jiewen" To: "Wu, Hao A" , "edk2-devel@lists.01.org" CC: "Wu, Hao A" , "Tian, Feng" , "Dong, Eric" Thread-Topic: [edk2] [PATCH] SecurityPkg TcgStorageCoreLib: ASSERT to ensure 'ByteSeq' is not NULL Thread-Index: AQHSQ8w7DnIWh5qOOUKJYmICX6r9WqDjEjAw Date: Mon, 21 Nov 2016 07:57:35 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C50386D8139@shsmsx102.ccr.corp.intel.com> References: <1479714734-8604-1-git-send-email-hao.a.wu@intel.com> In-Reply-To: <1479714734-8604-1-git-send-email-hao.a.wu@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] SecurityPkg TcgStorageCoreLib: ASSERT to ensure 'ByteSeq' is not NULL 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: Mon, 21 Nov 2016 07:57:38 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: jiewen.yao@intel.com > -----Original Message----- > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of > Hao Wu > Sent: Monday, November 21, 2016 3:52 PM > To: edk2-devel@lists.01.org > Cc: Wu, Hao A ; Tian, Feng ; > Dong, Eric > Subject: [edk2] [PATCH] SecurityPkg TcgStorageCoreLib: ASSERT to ensure > 'ByteSeq' is not NULL >=20 > Add ASSERT to make sure 'ByteSeq' is not NULL before comsumed by > CopyMem(). >=20 > Cc: Eric Dong > Cc: Feng Tian > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Hao Wu > --- > SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c > b/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c > index e333b55..76b25a3 100644 > --- a/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c > +++ b/SecurityPkg/Library/TcgStorageCoreLib/TcgStorageCore.c > @@ -1435,6 +1435,8 @@ TcgGetNextTcgUid( > return TcgResultFailure; > } >=20 > + ASSERT (ByteSeq !=3D NULL); > + > CopyMem(Uid, ByteSeq, sizeof(TCG_UID)); >=20 > return TcgResultSuccess; > -- > 1.9.5.msysgit.0 >=20 > _______________________________________________ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel