diff options
-rw-r--r-- | MdeModulePkg/Universal/EbcDxe/EbcExecute.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c index a6d0486632..4f47e206e7 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c @@ -1370,6 +1370,11 @@ EbcExecuteInstructions ( UINTN InstructionsLeft;
UINTN SavedInstructionCount;
+ if ((*VmPtr->Ip & 0x3F) >= sizeof(mVmOpcodeTable)) {
+ EbcDebugSignalException (EXCEPT_EBC_INVALID_OPCODE, EXCEPTION_FLAG_FATAL, VmPtr);
+ return EFI_UNSUPPORTED;
+ }
+
Status = EFI_SUCCESS;
if (*InstructionCount == 0) {
|