diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-11-08 04:36:22 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-11-08 04:36:22 +0000 |
commit | 3597bcbe27b9a00002db25fa8a43415e1168d14f (patch) | |
tree | 5916a9e1b87981d2d0b11125eaf573a9620039fe /MdeModulePkg/Library | |
parent | 2563c29363b6c4882ce13a9a08f80e350059e3ba (diff) | |
download | edk2-platforms-3597bcbe27b9a00002db25fa8a43415e1168d14f.tar.xz |
Check the GUID too before identify the opcode is a LABEL, otherwise it may treat other GUID opcode as a LABEL and mess up the FormSet.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6433 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library')
-rw-r--r-- | MdeModulePkg/Library/ExtendedIfrSupportLib/Common.c | 2 | ||||
-rw-r--r-- | MdeModulePkg/Library/ExtendedIfrSupportLib/Form.c | 5 | ||||
-rw-r--r-- | MdeModulePkg/Library/ExtendedIfrSupportLib/LibraryInternal.h | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/MdeModulePkg/Library/ExtendedIfrSupportLib/Common.c b/MdeModulePkg/Library/ExtendedIfrSupportLib/Common.c index e74c709df7..e5d11b5c33 100644 --- a/MdeModulePkg/Library/ExtendedIfrSupportLib/Common.c +++ b/MdeModulePkg/Library/ExtendedIfrSupportLib/Common.c @@ -53,7 +53,7 @@ ExtendedIfrSupportLibConstructor ( -GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID mIfrVendorGuid = EFI_IFR_TIANO_GUID;
+GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_GUID mIfrVendorGuid = EFI_IFR_TIANO_GUID;
/**
Extract formset class for given HII handle.
diff --git a/MdeModulePkg/Library/ExtendedIfrSupportLib/Form.c b/MdeModulePkg/Library/ExtendedIfrSupportLib/Form.c index a973d8f2dc..ae362b7879 100644 --- a/MdeModulePkg/Library/ExtendedIfrSupportLib/Form.c +++ b/MdeModulePkg/Library/ExtendedIfrSupportLib/Form.c @@ -179,7 +179,8 @@ UpdateFormPackageData ( ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode;
CopyMem (&LabelNumber, &((EFI_IFR_GUID_LABEL *)IfrOpHdr)->Number, sizeof (UINT16));
- if ((ExtendOpCode != EFI_IFR_EXTEND_OP_LABEL) || (LabelNumber != Label)) {
+ if ((ExtendOpCode != EFI_IFR_EXTEND_OP_LABEL) || (LabelNumber != Label)
+ || !CompareGuid (&((EFI_IFR_GUID_LABEL *)IfrOpHdr)->Guid, &mIfrVendorGuid)) {
//
// Go to the next Op-Code
//
@@ -218,7 +219,7 @@ UpdateFormPackageData ( IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length);
if (IfrOpHdr->OpCode == EFI_IFR_GUID_OP) {
ExtendOpCode = ((EFI_IFR_GUID_LABEL *) IfrOpHdr)->ExtendOpCode;
- if (ExtendOpCode == EFI_IFR_EXTEND_OP_LABEL) {
+ if ((ExtendOpCode == EFI_IFR_EXTEND_OP_LABEL) && CompareGuid (&((EFI_IFR_GUID_LABEL *)IfrOpHdr)->Guid, &mIfrVendorGuid)) {
break;
}
}
diff --git a/MdeModulePkg/Library/ExtendedIfrSupportLib/LibraryInternal.h b/MdeModulePkg/Library/ExtendedIfrSupportLib/LibraryInternal.h index a1d0c80ec3..8a48f9b0cc 100644 --- a/MdeModulePkg/Library/ExtendedIfrSupportLib/LibraryInternal.h +++ b/MdeModulePkg/Library/ExtendedIfrSupportLib/LibraryInternal.h @@ -34,6 +34,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <MdeModuleHii.h>
-extern EFI_GUID mIfrVendorGuid;
+extern CONST EFI_GUID mIfrVendorGuid;
#endif
|