RudjiGames / MTuner

MTuner is a C/C++ memory profiler and memory leak finder for Windows, PlayStation 4 and 3, Android and other platforms
BSD 2-Clause "Simplified" License
2.63k stars 145 forks source link

Fix out-of-bound access when filtering reads past the last operation #20

Closed EBatut-ALG closed 7 years ago

EBatut-ALG commented 7 years ago

An out-of-bound access can occur on the m_operations vector when the following conditions are met:

In that case, maxTimeOpIndex will be equal to the number of elements in the m_operations vector. Since the loop on line 1593 has a i<=maxTimeOpIndex end condition, it is possible to access the m_operations vector past its end and to read a non-existent MemoryOperation.