Skip to content

Commit

Permalink
Properly check address bounds of VU microprograms.
Browse files Browse the repository at this point in the history
  • Loading branch information
jpd002 committed Nov 6, 2023
1 parent f966598 commit f782a87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/ee/VuExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ BasicBlockPtr CVuExecutor::BlockFactory(CMIPS& context, uint32 begin, uint32 end

void CVuExecutor::PartitionFunction(uint32 startAddress)
{
uint32 endAddress = startAddress + MAX_BLOCK_SIZE - 4;
uint32 endAddress = std::min<uint32>(startAddress + MAX_BLOCK_SIZE - 4, m_maxAddress - 4);
uint32 branchAddress = MIPS_INVALID_PC;
for(uint32 address = startAddress; address < endAddress; address += 8)
{
Expand Down

0 comments on commit f782a87

Please sign in to comment.