From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: shenglei.zhang@intel.com) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by groups.io with SMTP; Sun, 15 Sep 2019 18:09:02 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Sep 2019 18:09:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,492,1559545200"; d="scan'208";a="190930278" Received: from shenglei-dev.ccr.corp.intel.com ([10.239.158.52]) by orsmga006.jf.intel.com with ESMTP; 15 Sep 2019 18:09:00 -0700 From: "Zhang, Shenglei" To: devel@edk2.groups.io Cc: Michael Kubacki , Chasel Chiu , Nate DeSimone , Liming Gao Subject: [PATCH v2] MinPlatformPkg/TestPointCheckLib: Add return value when OutTable is NULL Date: Mon, 16 Sep 2019 09:08:57 +0800 Message-Id: <20190916010857.42264-1-shenglei.zhang@intel.com> X-Mailer: git-send-email 2.18.0.windows.1 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 --- v2:Update the copyright and the if...else statement coding style. .../Test/Library/TestPointCheckLib/DxeCheckAcpi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckAcpi.c b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckAcpi.c index 263781a2..83736bf3 100644 --- a/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckAcpi.c +++ b/Platform/Intel/MinPlatformPkg/Test/Library/TestPointCheckLib/DxeCheckAcpi.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -610,6 +610,8 @@ DumpAcpiRsdt ( if (OutTable != NULL) { *OutTable = NULL; + } else{ + return EFI_INVALID_PARAMETER; } ReturnStatus = EFI_SUCCESS; @@ -663,6 +665,8 @@ DumpAcpiXsdt ( if (OutTable != NULL) { *OutTable = NULL; + } else{ + return EFI_INVALID_PARAMETER; } ReturnStatus = EFI_SUCCESS; -- 2.18.0.windows.1