From: rsun3 Date: Fri, 10 Jul 2009 10:13:04 +0000 (+0000) Subject: The FrameworkHiiOnUefiHiiThunk driver registers notification for creating/adding... X-Git-Tag: edk2-stable201903~17435 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=904ac28c0e0b10fea4c79e76006a4cab9903313a 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 --- 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; }