diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-23 04:45:48 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-01-23 04:45:48 +0000 |
commit | 485a505713dc6ff97c26fd8b289b1ecc847e5699 (patch) | |
tree | 1199ebafe6eae54eb3fd37da897d935999f5d544 /MdeModulePkg/Library | |
parent | cb263708057c72e1b83939f68cd5e8118ed35ed2 (diff) | |
download | edk2-platforms-485a505713dc6ff97c26fd8b289b1ecc847e5699.tar.xz |
Add more checkpoint for deference pointer.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7350 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r-- | MdeModulePkg/Library/GenericBdsLib/BdsBoot.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Library/GenericBdsLib/BdsMisc.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsBoot.c b/MdeModulePkg/Library/GenericBdsLib/BdsBoot.c index 953086c7d3..d273e3f604 100644 --- a/MdeModulePkg/Library/GenericBdsLib/BdsBoot.c +++ b/MdeModulePkg/Library/GenericBdsLib/BdsBoot.c @@ -411,7 +411,7 @@ BdsExpandPartitionPartialDevicePathToFull ( //
BdsLibConnectAllDriversToAllControllers ();
Status = gBS->LocateHandleBuffer (ByProtocol, &gEfiBlockIoProtocolGuid, NULL, &BlockIoHandleCount, &BlockIoBuffer);
- if (EFI_ERROR (Status) || BlockIoHandleCount == 0) {
+ if (EFI_ERROR (Status) || BlockIoHandleCount == 0 || BlockIoBuffer == NULL) {
//
// If there was an error or there are no device handles that support
// the BLOCK_IO Protocol, then return.
diff --git a/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c b/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c index b9e6ae7ef3..acf61ebcb6 100644 --- a/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c +++ b/MdeModulePkg/Library/GenericBdsLib/BdsMisc.c @@ -1170,7 +1170,7 @@ BdsSetMemoryTypeInformationVariable ( &gEfiMemoryTypeInformationGuid,
(VOID **) &CurrentMemoryTypeInformation
);
- if (EFI_ERROR (Status)) {
+ if (EFI_ERROR (Status) || CurrentMemoryTypeInformation == NULL) {
return;
}
|