Source level security checked

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7282 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jji4 2009-01-15 03:31:55 +00:00
parent b77d0076f9
commit 6d9f0e7eec
1 changed files with 5 additions and 0 deletions

View File

@ -1370,6 +1370,11 @@ EbcExecuteInstructions (
UINTN InstructionsLeft; UINTN InstructionsLeft;
UINTN SavedInstructionCount; UINTN SavedInstructionCount;
if ((*VmPtr->Ip & 0x3F) >= sizeof(mVmOpcodeTable)) {
EbcDebugSignalException (EXCEPT_EBC_INVALID_OPCODE, EXCEPTION_FLAG_FATAL, VmPtr);
return EFI_UNSUPPORTED;
}
Status = EFI_SUCCESS; Status = EFI_SUCCESS;
if (*InstructionCount == 0) { if (*InstructionCount == 0) {