mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Add length check to OGG check
Dav999 pointed out this potential issue on Discord. While basically all memcmp implementations will terminate early here if there's a null byte (because it's mismatched), it doesn't hurt to add the check here.
This commit is contained in:
parent
2dc7f0b5e8
commit
397d7f21b4
1 changed files with 1 additions and 1 deletions
|
@ -107,7 +107,7 @@ public:
|
|||
}
|
||||
|
||||
SDL_zerop(this);
|
||||
if (SDL_memcmp(mem, "OggS", 4) == 0)
|
||||
if (length >= 4 && SDL_memcmp(mem, "OggS", 4) == 0)
|
||||
{
|
||||
LoadOGG(fileName, mem, length);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue