PPUAnalyzer: Check if TOC from OPD is a valid address

This commit is contained in:
Eladash
2020-04-17 16:45:13 +03:00
committed by Ani
parent 1cb3bf6dab
commit 5960de2e20
+1 -1
View File
@@ -664,7 +664,7 @@ void ppu_module::analyse(u32 lib_toc, u32 entry)
const u32 _toc_end = _toc + 0x8000;
// TODO: improve TOC constraints
if (_toc % 4 || _toc == 0 || _toc >= 0x40000000 || (_toc >= start && _toc < end))
if (_toc % 4 || !vm::check_addr(_toc) || _toc >= 0x40000000 || (_toc >= start && _toc < end))
{
sec_end.set(0);
break;