Skip to content

Commit

Permalink
Merge pull request #11874 from AdmiralCurtiss/vi-clock-bounds
Browse files Browse the repository at this point in the history
VI: Prevent out-of-bounds access when clock register is a nonstandard value.
  • Loading branch information
lioncash committed Jun 7, 2023
2 parents a7678f3 + 10061aa commit bab3229
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/Core/HW/VideoInterface.cpp
Expand Up @@ -717,7 +717,7 @@ u32 VideoInterfaceManager::GetTargetRefreshRateDenominator() const

u32 VideoInterfaceManager::GetTicksPerSample() const
{
return 2 * SystemTimers::GetTicksPerSecond() / CLOCK_FREQUENCIES[m_clock];
return 2 * SystemTimers::GetTicksPerSecond() / CLOCK_FREQUENCIES[m_clock & 1];
}

u32 VideoInterfaceManager::GetTicksPerHalfLine() const
Expand Down

0 comments on commit bab3229

Please sign in to comment.