From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=217.140.101.70; helo=foss.arm.com; envelope-from=sakar.arora@arm.com; receiver=edk2-devel@lists.01.org Received: from foss.arm.com (foss.arm.com [217.140.101.70]) by ml01.01.org (Postfix) with ESMTP id D49C321180F5E for ; Tue, 6 Nov 2018 02:59:37 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AC9A1A78; Tue, 6 Nov 2018 02:59:37 -0800 (PST) Received: from u201365.usa.Arm.com (a75592.asiapac.arm.com [10.162.22.94]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5E2C63F5CF; Tue, 6 Nov 2018 02:59:36 -0800 (PST) From: Sakar Arora To: edk2-devel@lists.01.org Cc: prasanth.pulla@arm.com, Sakar Arora Date: Tue, 6 Nov 2018 16:29:18 +0530 Message-Id: <1541501958-17013-1-git-send-email-sakar.arora@arm.com> X-Mailer: git-send-email 2.7.4 Subject: [edk2-test][PATCH] uefi-sct/SctPkg: Framework: Enhanced Null Pointer Checks. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Nov 2018 10:59:38 -0000 On some AARCH64 Platforms, after all the tests are completed there was a synchronous exception and it was found to be NULL pointer access issue. Add additional NULL Pointer checks to resolve the exception. Signed-off-by: Sakar Arora Reported-by: Chandni Cherukuri --- .../TestInfrastructure/SCT/Framework/Data/SkippedCase.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/Data/SkippedCase.c b/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/Data/SkippedCase.c index b0cb1e9..c4a16c0 100644 --- a/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/Data/SkippedCase.c +++ b/uefi-sct/SctPkg/TestInfrastructure/SCT/Framework/Data/SkippedCase.c @@ -99,7 +99,10 @@ Returns: EFI_STATUS Status; UINT32 Order = 0; - if (ExecuteInfo == NULL) { + if ( (ExecuteInfo == NULL) || + (ExecuteInfo->TestCase == NULL) || + (ExecuteInfo->Category == NULL) || + (ExecuteInfo->SkippedCase == NULL) ) { return EFI_INVALID_PARAMETER; } @@ -302,10 +305,16 @@ Returns: // // Check parameters // - if ((DevicePath == NULL) || (FileName == NULL) || (ExecuteInfo == NULL)) { + if ( (DevicePath == NULL) || (FileName == NULL) ) { return EFI_INVALID_PARAMETER; } + if ( (ExecuteInfo == NULL) || + (ExecuteInfo->TestCase == NULL) || + (ExecuteInfo->Category == NULL) || + (ExecuteInfo->SkippedCase == NULL) ) { + return EFI_INVALID_PARAMETER; + } // // Debug information // -- 2.7.4