From: jji4 Date: Thu, 15 Jan 2009 03:46:29 +0000 (+0000) Subject: Array boundary evaluation expression fixed. X-Git-Tag: edk2-stable201903~18965 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=9cdae8c6a2fd018e8aa4f525041a4d1a5550d4f7 Array boundary evaluation expression fixed. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7283 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c index 4f47e206e7..788f505617 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c @@ -1370,7 +1370,7 @@ EbcExecuteInstructions ( UINTN InstructionsLeft; UINTN SavedInstructionCount; - if ((*VmPtr->Ip & 0x3F) >= sizeof(mVmOpcodeTable)) { + if ((*VmPtr->Ip & 0x3F) >= sizeof(mVmOpcodeTable)/sizeof(mVmOpcodeTable[0])) { EbcDebugSignalException (EXCEPT_EBC_INVALID_OPCODE, EXCEPTION_FLAG_FATAL, VmPtr); return EFI_UNSUPPORTED; }