Fix crash when loading invalid VisjectMeta

#4114
This commit is contained in:
2026-05-27 17:22:22 +02:00
parent 14ad3f892e
commit 7c1df5c980
+4 -2
View File
@@ -9,13 +9,15 @@ bool VisjectMeta::Load(ReadStream* stream, bool loadData)
{
Release();
int32 entries;
int32 entries = -1;
stream->ReadInt32(&entries);
if (entries < 0 || entries > MAX_uint16)
return true;
Entries.Resize(entries);
for (int32 i = 0; i < entries; i++)
{
Entry& e = Entries[i];
Entry& e = Entries.Get()[i];
stream->ReadInt32(&e.TypeID);
DateTime creationTime;