mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 03:44:13 +08:00
(PakOpener): additional sanity check.
This commit is contained in:
parent
98d6e6c555
commit
98ee3af701
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user