diff options
author | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-16 02:07:32 +0000 |
---|---|---|
committer | qhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-02-16 02:07:32 +0000 |
commit | 20bcdbcb69a63df43d897b51634a38df4e261b49 (patch) | |
tree | 2ae2599f8dc6a37cd1065071645eb64f97d3cebf /MdeModulePkg | |
parent | 13f0a970d20b0a88aa4929fb647faf880b35f3c9 (diff) | |
download | edk2-platforms-20bcdbcb69a63df43d897b51634a38df4e261b49.tar.xz |
Add assertion to ensure pointer dereference has been checked against NULL pointer.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7528 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Core/Dxe/FwVol/FwVol.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/Image/ImageFile.c | 1 | ||||
-rw-r--r-- | MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c index 2829092e17..f2451b03bf 100644 --- a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c @@ -556,7 +556,7 @@ NotifyFwVolBlock ( //
Status = CoreHandleProtocol (Handle, &gEfiFirmwareVolumeBlockProtocolGuid, (VOID **)&Fvb);
ASSERT_EFI_ERROR (Status);
-
+ ASSERT (Fvb != NULL);
//
// Make sure the Fv Header is O.K.
diff --git a/MdeModulePkg/Core/Dxe/Image/ImageFile.c b/MdeModulePkg/Core/Dxe/Image/ImageFile.c index 453e88b940..b132cf49d5 100644 --- a/MdeModulePkg/Core/Dxe/Image/ImageFile.c +++ b/MdeModulePkg/Core/Dxe/Image/ImageFile.c @@ -290,6 +290,7 @@ CoreOpenImageFile ( //
// Allocate space for the file
//
+ ASSERT (FileInfo != NULL);
ImageFileHandle->Source = AllocatePool ((UINTN)FileInfo->FileSize);
if (ImageFileHandle->Source != NULL) {
//
diff --git a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c index d2c40049d2..2dcad4e3d5 100644 --- a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c +++ b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c @@ -580,8 +580,8 @@ CreateChildNode ( // Decompress the stream
//
Status = CoreLocateProtocol (&gEfiDecompressProtocolGuid, NULL, (VOID **)&Decompress);
-
ASSERT_EFI_ERROR (Status);
+ ASSERT (Decompress != NULL);
Status = Decompress->GetInfo (
Decompress,
|