From 904ac28c0e0b10fea4c79e76006a4cab9903313a Mon Sep 17 00:00:00 2001 From: rsun3 Date: Fri, 10 Jul 2009 10:13:04 +0000 Subject: [PATCH] The FrameworkHiiOnUefiHiiThunk driver registers notification for creating/adding/removing string/form packages into the UEFI HII Database. The notification handler wants to parse the IFR binary data of the form package. However, the code assumes that a form package have a FORM SET OP and if not, it will assert. Remove assert and ignore form packages that can not be handled for error tolerant. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8874 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c | 1 - .../Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c index 5b326721ba..8a3f632bf4 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c @@ -802,7 +802,6 @@ NewOrAddPackNotify ( // Reparse the FormSet. // ThunkContext->FormSet = ParseFormSet (ThunkContext->UefiHiiHandle); - ASSERT (ThunkContext->FormSet != NULL); } return Status; diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c index e74830de56..4610c90dec 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c @@ -894,7 +894,10 @@ ParseFormSet ( CopyGuid (&FormSetGuid, &gZeroGuid); Status = InitializeFormSet (UefiHiiHandle, &FormSetGuid, FormSet); - ASSERT_EFI_ERROR (Status); + if (EFI_ERROR (Status)) { + FreePool (FormSet); + return NULL; + } return FormSet; } -- 2.39.5