summaryrefslogtreecommitdiff
path: root/EdkCompatibilityPkg/Foundation
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2010-12-06 09:14:47 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2010-12-06 09:14:47 +0000
commit54790583c0e318d0b248a8736abbf342410111e3 (patch)
tree3f7888bbe406a983dcacafe11afc772a0ecb2f5f /EdkCompatibilityPkg/Foundation
parent8df0bd287cba15b61f7aee52522a922799bb9efc (diff)
downloadedk2-platforms-54790583c0e318d0b248a8736abbf342410111e3.tar.xz
Refine code to make code more safely.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11123 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkCompatibilityPkg/Foundation')
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/ReportStatusCode.c2
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c2
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c2
-rw-r--r--EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/RuntimeLib.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/ReportStatusCode.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/ReportStatusCode.c
index e5b84d205a..8ab071fc45 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/ReportStatusCode.c
+++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiDriverLib/ReportStatusCode.c
@@ -149,7 +149,7 @@ Returns:
// Try to get the PEI version of ReportStatusCode.
//
Status = GetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **) &gReportStatusCode);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || (gReportStatusCode == NULL)) {
return EFI_UNSUPPORTED;
}
}
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c
index c41a85c38d..3f5243387d 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c
+++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrCommon.c
@@ -700,7 +700,7 @@ Returns:
Status = HiiDatabase->ExportPackageLists (HiiDatabase, Handle, &BufferSize, HiiPackageList);
}
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || (HiiPackageList == NULL)) {
return Status;
}
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c
index 355935322c..43d7fc6364 100644
--- a/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c
+++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/UefiEfiIfrSupportLib/UefiIfrForm.c
@@ -958,7 +958,7 @@ ConstructConfigAltResp (
);
}
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || (ConfigHdr == NULL)) {
return Status;
}
diff --git a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/RuntimeLib.c b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/RuntimeLib.c
index 29cdeb967a..83820a3bba 100644
--- a/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/RuntimeLib.c
+++ b/EdkCompatibilityPkg/Foundation/Library/RuntimeDxe/EfiRuntimeLib/Ia32/RuntimeLib.c
@@ -930,7 +930,7 @@ Returns:
// Try to get the PEI version of ReportStatusCode.
//
Status = GetPeiProtocol (&gEfiStatusCodeRuntimeProtocolGuid, (VOID **) &gReportStatusCode);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || (gReportStatusCode == NULL)) {
return EFI_UNSUPPORTED;
}
}