summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Core
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Core')
-rw-r--r--MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c2
-rw-r--r--MdeModulePkg/Core/Pei/FwVol/FwVol.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
index d9fa20daa8..7d4284057c 100644
--- a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
+++ b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c
@@ -807,6 +807,7 @@ FindChildNode (
CurrentChildNode = CHILD_SECTION_NODE_FROM_LINK (GetFirstNode(&SourceStream->Children));
for (;;) {
+ ASSERT (CurrentChildNode != NULL);
if (ChildIsType (SourceStream, CurrentChildNode, SearchType, SectionDefinitionGuid)) {
//
// The type matches, so check the instance count to see if it's the one we want
@@ -877,7 +878,6 @@ FindChildNode (
if (EFI_ERROR (Status)) {
return Status;
}
- ASSERT (CurrentChildNode != NULL);
} else {
ASSERT (EFI_ERROR (ErrorStatus));
return ErrorStatus;
diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
index 6892d22a42..276b6f979f 100644
--- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c
+++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c
@@ -1391,6 +1391,7 @@ FindNextCoreFvHandle (
}
}
+ ASSERT (Private->FvCount <= FixedPcdGet32 (PcdPeiCoreMaxFvSupported));
if (Instance >= Private->FvCount) {
return NULL;
}
@@ -1473,7 +1474,7 @@ AddUnknownFormatFvInfo (
{
PEI_CORE_UNKNOW_FORMAT_FV_INFO *NewUnknownFv;
- if (PrivateData->UnknownFvInfoCount + 1 >= FixedPcdGet32 (PcdPeiCoreMaxPeimPerFv)) {
+ if (PrivateData->UnknownFvInfoCount + 1 >= FixedPcdGet32 (PcdPeiCoreMaxFvSupported)) {
return EFI_OUT_OF_RESOURCES;
}