summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/PeiReportStatusCodeLib
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-11-04 20:58:23 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-11-04 20:58:23 +0000
commitc5e0de8794346f0e11ae63f1e7705e784dcd5f81 (patch)
tree993fd44a366cea6d4afe634ef48a40a98988486d /MdeModulePkg/Library/PeiReportStatusCodeLib
parent9be899c5cc644d710e3392dedb672bf67b84b9c1 (diff)
downloadedk2-c5e0de8794346f0e11ae63f1e7705e784dcd5f81.zip
edk2-c5e0de8794346f0e11ae63f1e7705e784dcd5f81.tar.gz
edk2-c5e0de8794346f0e11ae63f1e7705e784dcd5f81.tar.bz2
Prevent infinite recursion when ASSERT(), DEBUG(), or any other use of ReportStatusCode is performed at > TPL_NOTIFY or there is not enough memory to allocate a buffer for the ExtendedData associated with the status code being reported
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11003 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/PeiReportStatusCodeLib')
-rw-r--r--MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c b/MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
index 896c286..176c7ad 100644
--- a/MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
+++ b/MdeModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c
@@ -470,6 +470,11 @@ ReportStatusCodeEx (
ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));
if (ExtendedDataSize > (MAX_EXTENDED_DATA_SIZE - sizeof (EFI_STATUS_CODE_DATA))) {
+ //
+ // The local variable Buffer not large enough to hold the extended data associated
+ // with the status code being reported.
+ //
+ ASSERT (FALSE);
return EFI_OUT_OF_RESOURCES;
}
StatusCodeData = (EFI_STATUS_CODE_DATA *) Buffer;