mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-10 19:09:45 +01:00
Disallow negative size values in BinaryBlob
This commit is contained in:
parent
4894639b3a
commit
bd71fb8a68
1 changed files with 4 additions and 0 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue