mirror of
https://github.com/crskycode/GARbro.git
synced 2026-06-06 13:48:57 +08:00
(PakOpener): additional sanity check.
This commit is contained in:
@@ -48,7 +48,7 @@ namespace GameRes.Formats.Magi
|
||||
if (!IsSaneCount (count))
|
||||
return null;
|
||||
uint index_size = file.View.ReadUInt32 (0xC);
|
||||
if (index_size > file.MaxOffset)
|
||||
if (index_size < 2 || index_size > file.MaxOffset)
|
||||
return null;
|
||||
|
||||
long base_offset = 0x118 + index_size;
|
||||
|
||||
Reference in New Issue
Block a user