diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-02 01:38:00 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-02-02 01:38:00 +0000 |
commit | d228526f931a51694919a65867310606e64611a5 (patch) | |
tree | 59fadf89823f8b6d471ad64375fcc860bc210fd4 /MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | |
parent | 158bb28ae03d85a513c49aec6539f159489700a0 (diff) | |
download | edk2-platforms-d228526f931a51694919a65867310606e64611a5.tar.xz |
Add support to original EFI_IFR_FORM_SET in initial UEFI2.1 spec. Now, it has been updated to new one in UEFI2.1D.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9906 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Setup.c')
-rw-r--r-- | MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 36ed98c998..ab98ada1c8 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -2461,18 +2461,23 @@ GetIfrBinaryData ( break;
}
- //
- // Try to compare against formset class GUID
- //
- NumberOfClassGuid = (UINT8) (((EFI_IFR_FORM_SET *) OpCodeData)->Flags & 0x3);
- ClassGuid = (EFI_GUID *) (OpCodeData + sizeof (EFI_IFR_FORM_SET));
- for (Index = 0; Index < NumberOfClassGuid; Index++) {
- if (CompareGuid (ComparingGuid, ClassGuid + Index)) {
- ClassGuidMatch = TRUE;
+ if (((EFI_IFR_OP_HEADER *) OpCodeData)->Length > OFFSET_OF (EFI_IFR_FORM_SET, Flags)) {
+ //
+ // Try to compare against formset class GUID
+ //
+ NumberOfClassGuid = (UINT8) (((EFI_IFR_FORM_SET *) OpCodeData)->Flags & 0x3);
+ ClassGuid = (EFI_GUID *) (OpCodeData + sizeof (EFI_IFR_FORM_SET));
+ for (Index = 0; Index < NumberOfClassGuid; Index++) {
+ if (CompareGuid (ComparingGuid, ClassGuid + Index)) {
+ ClassGuidMatch = TRUE;
+ break;
+ }
+ }
+ if (ClassGuidMatch) {
break;
}
- }
- if (ClassGuidMatch) {
+ } else if (ComparingGuid == &gEfiHiiPlatformSetupFormsetGuid) {
+ ClassGuidMatch = TRUE;
break;
}
}
|