pvr: avoid TA data buffer overflow and raise Object List overflow int

fixes Ooga Booga crash/hang in offline and online multiplayer
This commit is contained in:
Flyinghead 2019-12-23 12:25:45 +01:00
parent 3415ce5577
commit 13de6b9a1e
1 changed files with 6 additions and 0 deletions

View File

@ -290,6 +290,12 @@ void DYNACALL ta_thd_data32_i(void* data)
INFO_LOG(PVR, "Warning: data sent to TA prior to ListInit. Ignored");
return;
}
if (ta_tad.End() - ta_tad.thd_root >= TA_DATA_SIZE)
{
INFO_LOG(PVR, "Warning: TA data buffer overflow");
asic_RaiseInterrupt(holly_MATR_NOMEM);
return;
}
simd256_t* dst = (simd256_t*)ta_tad.thd_data;
simd256_t* src = (simd256_t*)data;