1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-26 06:28:30 +02:00

If invalid valid value, set valid to false

This is just to prevent parsing potentially garbage data, because some
of the code relies on the `valid` value being valid.
This commit is contained in:
Misa 2020-06-30 17:58:34 -07:00 committed by Ethan Lee
parent 170e93054a
commit 97bf731fa3

View File

@ -103,6 +103,7 @@ bool binaryBlob::unPackBinary(const char* name)
if (m_headers[i].valid & ~0x1 || !m_headers[i].valid)
{
m_headers[i].valid = false;
continue; /* Must be EXACTLY 1 or 0 */
}
if (m_headers[i].size < 1)