1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-02 11:03:32 +02:00

Disallow negative size values in BinaryBlob

This commit is contained in:
Ethan Lee 2020-06-14 22:43:58 -04:00
parent 4894639b3a
commit bd71fb8a68

View File

@ -105,6 +105,10 @@ bool binaryBlob::unPackBinary(const char* name)
{
continue; /* Must be EXACTLY 1 or 0 */
}
if (size < 1)
{
continue; /* Must be nonzero and positive */
}
if ((offset + m_headers[i].size) > size)
{
continue; /* Bogus size value */