1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01: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)