]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Core/Pei/Ppi/Ppi.c
Source level security checked
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Ppi / Ppi.c
index 556a970f8b3e6910cfe6b2e9889293220fc7c993..6feab63412f44d8d4c932145abe81e65618b0834 100644 (file)
@@ -167,7 +167,6 @@ PeiInstallPpi (
     }\r
 \r
     DEBUG((EFI_D_INFO, "Install PPI: %g\n", PpiList->Guid));\r
-    ASSERT (Index < FixedPcdGet32 (PcdPeiCoreMaxPpiSupported));\r
     PrivateData->PpiData.PpiListPtrs[Index].Ppi = (EFI_PEI_PPI_DESCRIPTOR*) PpiList;\r
     PrivateData->PpiData.PpiListEnd++;\r
 \r
@@ -254,6 +253,7 @@ PeiReInstallPpi (
   // Remove the old PPI from the database, add the new one.\r
   //\r
   DEBUG((EFI_D_INFO, "Reinstall PPI: %g\n", NewPpi->Guid));\r
+  ASSERT (Index < FixedPcdGet32 (PcdPeiCoreMaxPpiSupported));\r
   PrivateData->PpiData.PpiListPtrs[Index].Ppi = (EFI_PEI_PPI_DESCRIPTOR *) NewPpi;\r
 \r
   //\r