summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-10 10:13:04 +0000
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-10 10:13:04 +0000
commit904ac28c0e0b10fea4c79e76006a4cab9903313a (patch)
tree2b8e4e346c261dbfa71b5ae750de356338687d09
parentada3f18c41fd75232fd218172e5ea1c7abd8e038 (diff)
downloadedk2-904ac28c0e0b10fea4c79e76006a4cab9903313a.zip
edk2-904ac28c0e0b10fea4c79e76006a4cab9903313a.tar.gz
edk2-904ac28c0e0b10fea4c79e76006a4cab9903313a.tar.bz2
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
-rw-r--r--EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c1
-rw-r--r--EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Utility.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c
index 5b32672..8a3f632 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 e74830d..4610c90 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;
}