diff options
Diffstat (limited to 'EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c')
-rw-r--r-- | EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c index 58dba9dc20..fb664a2928 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/Package.c @@ -401,8 +401,12 @@ FindStringPackAndUpdatePackListWithOnlyIfrPack ( if (ThunkContext != IfrThunkContext) {
if (CompareGuid (&IfrThunkContext->TagGuid, &ThunkContext->TagGuid) && (ThunkContext->IfrPackageCount == 0)) {
+ StringPackageListHeader = NULL;
Status = ExportPackageLists (ThunkContext->UefiHiiHandle, &StringPackageListHeader, &Size);
ASSERT_EFI_ERROR (Status);
+ if (StringPackageListHeader == NULL) {
+ return EFI_NOT_FOUND;
+ }
IfrThunkContext->StringPackageCount = GetPackageCountByType (StringPackageListHeader, EFI_HII_PACKAGE_STRINGS);
//
@@ -506,6 +510,10 @@ UefiRegisterPackageList ( ASSERT ((StringPackageCount >=1 && IfrPackageCount == 1) || (FontPackageCount > 0));
if (IfrPackageCount > 0) {
IfrPackage = GetIfrPackage (Packages);
+ if (IfrPackage == NULL) {
+ Status = EFI_NOT_FOUND;
+ goto Done;
+ }
GetFormSetGuid (IfrPackage, &ThunkContext->TagGuid);
} else {
ASSERT (FontPackageCount > 0);
@@ -860,8 +868,12 @@ RemovePackNotify ( //
if (ThunkContext != NULL) {
if (!ThunkContext->ByFrameworkHiiNewPack) {
+ HiiPackageList = NULL;
Status = ExportPackageLists (Handle, &HiiPackageList, &BufferSize);
ASSERT_EFI_ERROR (Status);
+ if (HiiPackageList == NULL) {
+ return EFI_NOT_FOUND;
+ }
if (GetPackageCountByType (HiiPackageList, EFI_HII_PACKAGE_STRINGS) == 1) {
//
|