public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-test][PATCH] uefi-sct/SctPkg: Framework: Enhanced Null Pointer Checks.
@ 2018-11-06 10:59 Sakar Arora
  0 siblings, 0 replies; only message in thread
From: Sakar Arora @ 2018-11-06 10:59 UTC (permalink / raw)
  To: edk2-devel; +Cc: prasanth.pulla, Sakar Arora

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 <sakar.arora@arm.com>
Reported-by: Chandni Cherukuri <Chandni.Cherukuri@arm.com>
---
 .../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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-06 10:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-06 10:59 [edk2-test][PATCH] uefi-sct/SctPkg: Framework: Enhanced Null Pointer Checks Sakar Arora

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox