Skip to content

Commit

Permalink
microvu: fix ASAN container-overflow in mVUsetupRange
Browse files Browse the repository at this point in the history
  • Loading branch information
oltolm authored and F0bes committed Sep 16, 2024
1 parent 158e67c commit 4c267c4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pcsx2/x86/microVU_Compile.inl
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,9 @@ void mVUsetupRange(microVU& mVU, s32 pc, bool isStartPC)
if (mVUrange.start <= cur_pc)
{
mVUrange.end = cur_pc;
s32& rStart = mVUrange.start;
s32& rEnd = mVUrange.end;
std::deque<microRange>::iterator it(ranges->begin());
it++;
for (;it != ranges->end();)
s32 rStart = mVUrange.start;
s32 rEnd = mVUrange.end;
for (auto it = ranges->begin() + 1; it != ranges->end();)
{
if (((it->start >= rStart) && (it->start <= rEnd)) || ((it->end >= rStart) && (it->end <= rEnd))) // Starts after this prog but starts before the end of current prog
{
Expand Down

0 comments on commit 4c267c4

Please sign in to comment.