]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
Prevent infinite recursion when ASSERT(), DEBUG(), or any other use of ReportStatusCo...
[mirror_edk2.git] / MdeModulePkg / Library / PeiReportStatusCodeLib / ReportStatusCodeLib.c
index 896c286834ae9bc3c28b9e86529084fee7e1881c..176c7ada4d5d33396eb716025e1a020f49bd3d3f 100644 (file)
@@ -470,6 +470,11 @@ ReportStatusCodeEx (
   ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));\r
 \r
   if (ExtendedDataSize > (MAX_EXTENDED_DATA_SIZE - sizeof (EFI_STATUS_CODE_DATA))) {\r
+    //\r
+    // The local variable Buffer not large enough to hold the extended data associated\r
+    // with the status code being  reported.\r
+    //\r
+    ASSERT (FALSE);\r
     return EFI_OUT_OF_RESOURCES;\r
   }\r
   StatusCodeData = (EFI_STATUS_CODE_DATA  *) Buffer;\r