From 3711f8f842a40a14aa48fa098ea91ad65a5da567 Mon Sep 17 00:00:00 2001 From: qwang12 Date: Wed, 16 Apr 2008 10:31:46 +0000 Subject: [PATCH] (((EFI_IFR_FORM_SET *) OpCodeData)->Guid) may not align properly on UINT32 boundary. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5072 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c index 37be9d212e..75294c7e59 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiToUefiHiiThunk/Utility.c @@ -29,7 +29,7 @@ GetGuidOfFirstFormset ( while ((UINT8 *) OpCodeData < StartOfNextPackage) { if (OpCodeData->OpCode == EFI_IFR_FORM_SET_OP) { - return &(((EFI_IFR_FORM_SET *) OpCodeData)->Guid); + return AllocateCopyPool (sizeof(EFI_GUID), &(((EFI_IFR_FORM_SET *) OpCodeData)->Guid)); } OpCodeData = (EFI_IFR_OP_HEADER *) ((UINT8 *) OpCodeData + OpCodeData->Length); }