mirror of
https://github.com/crskycode/GARbro.git
synced 2026-07-08 01:30:18 +08:00
(DatOpener): check file size first.
This commit is contained in:
@@ -48,6 +48,8 @@ namespace GameRes.Formats.NekoSDK
|
|||||||
|
|
||||||
public override ArcFile TryOpen (ArcView file)
|
public override ArcFile TryOpen (ArcView file)
|
||||||
{
|
{
|
||||||
|
if (file.MaxOffset < 0x8C)
|
||||||
|
return null;
|
||||||
uint first_offset = file.View.ReadUInt32 (0x88) ^ 0xCACACAu;
|
uint first_offset = file.View.ReadUInt32 (0x88) ^ 0xCACACAu;
|
||||||
if (first_offset <= 0 || first_offset >= file.MaxOffset)
|
if (first_offset <= 0 || first_offset >= file.MaxOffset)
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user