mirror of
https://github.com/crskycode/GARbro.git
synced 2025-01-11 20:39:29 +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))
|
if (!IsSaneCount (count))
|
||||||
return null;
|
return null;
|
||||||
uint index_size = file.View.ReadUInt32 (0xC);
|
uint index_size = file.View.ReadUInt32 (0xC);
|
||||||
if (index_size > file.MaxOffset)
|
if (index_size < 2 || index_size > file.MaxOffset)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
long base_offset = 0x118 + index_size;
|
long base_offset = 0x118 + index_size;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user