Merge pull request #187 from acts-1631/fix-savestate-fifo-bounds
Validate FIFO lengths when loading save states
This commit is contained in:
commit
9b974fa900
1 changed files with 7 additions and 0 deletions
|
|
@ -150,6 +150,13 @@ public:
|
|||
|
||||
if (m_mode == Mode::Read)
|
||||
{
|
||||
if (m_error || size > CAPACITY)
|
||||
{
|
||||
m_error = true;
|
||||
data->Clear();
|
||||
return;
|
||||
}
|
||||
|
||||
T* temp = new T[size];
|
||||
DoArray(temp, size);
|
||||
data->Clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue