From nobody Sat Nov 2 14:25:20 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1488159527067846.8019585093465; Sun, 26 Feb 2017 17:38:47 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 0A98782179; Sun, 26 Feb 2017 17:38:46 -0800 (PST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 867D9820A9 for ; Sun, 26 Feb 2017 17:38:42 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2017 17:38:42 -0800 Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.13]) by orsmga005.jf.intel.com with ESMTP; 26 Feb 2017 17:38:41 -0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,211,1484035200"; d="scan'208";a="69327194" From: Hao Wu To: edk2-devel@lists.01.org Date: Mon, 27 Feb 2017 09:38:35 +0800 Message-Id: <1488159516-8864-2-git-send-email-hao.a.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.0 In-Reply-To: <1488159516-8864-1-git-send-email-hao.a.wu@intel.com> References: <1488159516-8864-1-git-send-email-hao.a.wu@intel.com> Subject: [edk2] [PATCH 1/2] PerformancePkg/Dp_App: Add check to avoid NULL pointer dereference 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: , Cc: Hao Wu , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Star Zeng --- PerformancePkg/Dp_App/Dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PerformancePkg/Dp_App/Dp.c b/PerformancePkg/Dp_App/Dp.c index e2cb862..4cdc39e 100644 --- a/PerformancePkg/Dp_App/Dp.c +++ b/PerformancePkg/Dp_App/Dp.c @@ -400,7 +400,7 @@ InitializeDp ( // EndCount =3D Value counter counts to before it needs to be r= eset // Status =3D EfiGetSystemConfigurationTable (&gPerformanceProtocolGuid= , (VOID **) &PerformanceProperty); - if (EFI_ERROR (Status)) { + if (EFI_ERROR (Status) || (PerformanceProperty =3D=3D NULL)) { PrintToken (STRING_TOKEN (STR_PERF_PROPERTY_NOT_FOUND)); goto Done; } --=20 1.9.5.msysgit.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Sat Nov 2 14:25:20 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1488159528350715.8949281819108; Sun, 26 Feb 2017 17:38:48 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 368B8821B1; Sun, 26 Feb 2017 17:38:46 -0800 (PST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 EE62682179 for ; Sun, 26 Feb 2017 17:38:43 -0800 (PST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Feb 2017 17:38:43 -0800 Received: from shwdeopenpsi014.ccr.corp.intel.com ([10.239.9.13]) by orsmga005.jf.intel.com with ESMTP; 26 Feb 2017 17:38:42 -0800 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,211,1484035200"; d="scan'208";a="69327201" From: Hao Wu To: edk2-devel@lists.01.org Date: Mon, 27 Feb 2017 09:38:36 +0800 Message-Id: <1488159516-8864-3-git-send-email-hao.a.wu@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.0 In-Reply-To: <1488159516-8864-1-git-send-email-hao.a.wu@intel.com> References: <1488159516-8864-1-git-send-email-hao.a.wu@intel.com> Subject: [edk2] [PATCH 2/2] ShellPkg/UefiDpLib: Add check to avoid NULL pointer dereference 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: , Cc: Hao Wu , Star Zeng MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Star Zeng Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu Reviewed-by: Star Zeng --- ShellPkg/Library/UefiDpLib/Dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiDpLib/Dp.c b/ShellPkg/Library/UefiDpLib/D= p.c index 33f69a0..35ead75 100644 --- a/ShellPkg/Library/UefiDpLib/Dp.c +++ b/ShellPkg/Library/UefiDpLib/Dp.c @@ -272,7 +272,7 @@ ShellCommandRunDp ( // EndCount =3D Value counter counts to before it needs to be reset // Status =3D EfiGetSystemConfigurationTable (&gPerformanceProtocolGuid, (V= OID **) &PerformanceProperty); - if (EFI_ERROR (Status)) { + if (EFI_ERROR (Status) || (PerformanceProperty =3D=3D NULL)) { ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_PERF_PROPERTY_NOT_FOU= ND), gDpHiiHandle); goto Done; } --=20 1.9.5.msysgit.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel