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.43; helo=mga05.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 BD6BF223DB7A3 for ; Thu, 8 Feb 2018 22:51:59 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Feb 2018 22:57:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,482,1511856000"; d="scan'208";a="16818055" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 08 Feb 2018 22:57:44 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 8 Feb 2018 22:57:44 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by shsmsx102.ccr.corp.intel.com ([169.254.2.124]) with mapi id 14.03.0319.002; Fri, 9 Feb 2018 14:57:09 +0800 From: "Gao, Liming" To: "Bi, Dandan" , "edk2-devel@lists.01.org" CC: "Wu, Hao A" Thread-Topic: [patch 1/2] ShellPkg/Dp: Add null pointer check Thread-Index: AQHToVOTsZmQyUrNDk+ieH5oM30qu6Obo7uw Date: Fri, 9 Feb 2018 06:57:08 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1CAD0E@SHSMSX104.ccr.corp.intel.com> References: <1518145812-14188-1-git-send-email-dandan.bi@intel.com> In-Reply-To: <1518145812-14188-1-git-send-email-dandan.bi@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [patch 1/2] ShellPkg/Dp: Add null pointer check 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: Fri, 09 Feb 2018 06:52:00 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Bi, Dandan >Sent: Friday, February 09, 2018 11:10 AM >To: edk2-devel@lists.01.org >Cc: Gao, Liming ; Wu, Hao A >Subject: [patch 1/2] ShellPkg/Dp: Add null pointer check > >Cc: Liming Gao >Cc: Hao Wu >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Dandan Bi >--- > ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c >b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c >index fafc64f..4dd7dd9 100644 >--- a/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c >+++ b/ShellPkg/DynamicCommand/DpDynamicCommand/Dp.c >@@ -255,11 +255,11 @@ GetBootPerformanceTable ( > Status =3D EfiGetSystemConfigurationTable ( > &gEfiAcpi10TableGuid, > &AcpiTable > ); > } >- if (EFI_ERROR(Status)) { >+ if (EFI_ERROR(Status) || AcpiTable =3D=3D NULL) { > return Status; > } > > FirmwarePerformanceTable =3D FindAcpiPtr ( > (EFI_ACPI_5_0_ROOT_SYSTEM_DESCRIPTION_POINTER >*)AcpiTable, >-- >1.9.5.msysgit.1