mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-30 01:48:15 +03: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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user