From f63085f50c1e8c086d6c4007a9ec68fa66267411 Mon Sep 17 00:00:00 2001 From: li-elvin Date: Tue, 13 Sep 2011 06:16:51 +0000 Subject: [PATCH] Add NULl check for pointer. Signed-off-by: li-elvin Reviewed-by: lgao4, lzeng14 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12333 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c | 2 ++ MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c | 1 + 2 files changed, 3 insertions(+) diff --git a/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c b/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c index 76c719a54e..a32b6d6645 100644 --- a/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c +++ b/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c @@ -541,6 +541,8 @@ GetCapsuleInfo ( UINTN Count; UINTN Size; + ASSERT (Desc != NULL); + Count = 0; Size = 0; diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c index 596e8b2d8b..80ccb1995e 100644 --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c @@ -973,6 +973,7 @@ SmbiosCreateTable ( // // Assemble the tables // + ASSERT (EntryPointStructure->TableAddress != 0); BufferPointer = (UINT8 *) (UINTN) EntryPointStructure->TableAddress; CurrentSmbiosEntry = NULL; do {