From nobody Sat May 4 16:36:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+46671+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46671+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1567427697; cv=none; d=zoho.com; s=zohoarc; b=TRIkQ+PyIn2VAPlnDibuBAOrCINH2yTJTcbrv0h4rrnGgPqLvEf//42oqdlLkNH0u58dVU6FFD6oMyssR6k8iTyn0wN3kpGj40seRaOjpHtQzwy1riVhixVO9EkNCal6sQbuW891LOt/9zlChi6ituquw+1hevYc04OKp6DKx0U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1567427697; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=YrHG6HJ9uCCPvV2WF3dlnTvu77qzKTuF0YYMy/wUPWU=; b=K0O7tZVu6pAB79FFsuXjHK3YrO/nuVAe5iI1xkr3NX2SJpm/Yk6cTV3fofNfA6jBK6bEsPvXUeYgkvhFY4BJzdRYl5NbdvEdm7GTqOB1ATEeVo7qZpI3VvZtBlkH2dZNZWkFw4TWtw5TSAAXNqWnxYkQu5dP4+HFQz/JAoD8UFg= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+46671+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 156742769794951.21780334670893; Mon, 2 Sep 2019 05:34:57 -0700 (PDT) Return-Path: X-Received: from mga06.intel.com (mga06.intel.com []) by groups.io with SMTP; Mon, 02 Sep 2019 05:34:57 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Sep 2019 05:34:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,459,1559545200"; d="scan'208";a="186990346" X-Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by orsmga006.jf.intel.com with ESMTP; 02 Sep 2019 05:34:55 -0700 From: "Zhang, Shenglei" To: devel@edk2.groups.io Cc: Michael Kubacki , Chasel Chiu , Nate DeSimone , Liming Gao Subject: [edk2-devel] [PATCH] MinPlatformPkg/TestPointCheckLib: Add return value when OutTable is NULL Date: Mon, 2 Sep 2019 20:34:50 +0800 Message-Id: <20190902123452.27716-2-shenglei.zhang@intel.com> In-Reply-To: <20190902123452.27716-1-shenglei.zhang@intel.com> References: <20190902123452.27716-1-shenglei.zhang@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,shenglei.zhang@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1567427697; bh=hfGbiWaFjDLpqfCFOpMUpJ68Zm8H9jF9XE+yrckDwdc=; h=Cc:Date:From:Reply-To:Subject:To; b=KfRKosIatn2wfV4gHtOSVJqgIisb1zRVRzYLuwYE5ox1/tgLchlDowiwvpa3ILExpEl IMjhGmB98ABY/H+rIfALaQe9okcnr84Dp0JKiDf6fn5x4LPZQ0LYBoE1euMktYlIpV5E2 1cUoOyJXGwBrLo++vV8epGbInnjX6n7VicU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Currently there is no check for the parameter OutTable. So add the logic that return value EFI_INVALID_PARAMETER when the OutTable is NULL. Cc: Michael Kubacki Cc: Chasel Chiu Cc: Nate DeSimone Cc: Liming Gao Signed-off-by: Shenglei Zhang --- .../Test/Library/TestPointCheckLib/DxeCheckAcpi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/D= xeCheckAcpi.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLi= b/DxeCheckAcpi.c index 263781a2..3828ab72 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheck= Acpi.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheck= Acpi.c @@ -611,6 +611,9 @@ DumpAcpiRsdt ( if (OutTable !=3D NULL) { *OutTable =3D NULL; } + else{ + return EFI_INVALID_PARAMETER; + }=20 =20 ReturnStatus =3D EFI_SUCCESS; EntryCount =3D (Rsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / s= izeof(UINT32); @@ -664,6 +667,9 @@ DumpAcpiXsdt ( if (OutTable !=3D NULL) { *OutTable =3D NULL; } + else{ + return EFI_INVALID_PARAMETER; + }=20 =20 ReturnStatus =3D EFI_SUCCESS; EntryCount =3D (Xsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / s= izeof(UINT64); --=20 2.18.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#46671): https://edk2.groups.io/g/devel/message/46671 Mute This Topic: https://groups.io/mt/33110620/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-