diff options
3 files changed, 11 insertions, 4 deletions
diff --git a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrDefault.c b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrDefault.c index b82b02e018..a55aa2ba9f 100644 --- a/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrDefault.c +++ b/EdkCompatibilityPkg/Compatibility/FrameworkHiiOnUefiHiiThunk/UefiIfrDefault.c @@ -358,7 +358,7 @@ UefiIfrGetBufferTypeDefaults ( ASSERT (UefiDefaults != NULL);
*UefiDefaults = AllocateZeroPool (sizeof (LIST_ENTRY));
- ASSERT (UefiDefaults != NULL);
+ ASSERT (*UefiDefaults != NULL);
InitializeListHead (*UefiDefaults);
DefaultLink = GetFirstNode (&ThunkContext->FormSet->DefaultStoreListHead);
diff --git a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiIfrSupportLib/IfrCommon.c b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiIfrSupportLib/IfrCommon.c index dd674f53f9..92fa85abcf 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiIfrSupportLib/IfrCommon.c +++ b/EdkCompatibilityPkg/Foundation/Library/Dxe/EfiIfrSupportLib/IfrCommon.c @@ -582,7 +582,7 @@ Returns: //
// Return an error if buffer is too small
//
- if (SizeOfNvStore > *ImageLength) {
+ if (SizeOfNvStore > *ImageLength || DefaultImage == NULL) {
gBS->FreePool (OldData);
*ImageLength = (UINT16) SizeOfNvStore;
return EFI_BUFFER_TOO_SMALL;
diff --git a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c index 76c93b28ae..b12045ed66 100644 --- a/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c +++ b/EdkCompatibilityPkg/Foundation/Library/Thunk16/X86Thunk.c @@ -311,8 +311,15 @@ Returns: --*/
{
- RegisterSet->E.EIP = (UINT16)((UINT32 *)NULL)[IntNumber];
- RegisterSet->E.CS = (UINT16)(((UINT32 *)NULL)[IntNumber] >> 16);
+ UINT32 *VectorBase;
+
+ //
+ // The base address of legacy interrupt vector table is 0.
+ // We use this base address to get the legacy interrupt handler.
+ //
+ VectorBase = 0;
+ RegisterSet->E.EIP = (UINT16)(VectorBase)[IntNumber];
+ RegisterSet->E.CS = (UINT16)((VectorBase)[IntNumber] >> 16);
return AsmThunk16 (ThunkContext, RegisterSet, Flags | THUNK_INTERRUPT);
}
|