mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 09:28:15 +03:00
Disallow negative size values in BinaryBlob
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user