mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-27 21:34:14 +08:00
(DatOpener): check file size first.
This commit is contained in:
parent
4010525cb1
commit
54adb248fd
@ -48,6 +48,8 @@ namespace GameRes.Formats.NekoSDK
|
||||
|
||||
public override ArcFile TryOpen (ArcView file)
|
||||
{
|
||||
if (file.MaxOffset < 0x8C)
|
||||
return null;
|
||||
uint first_offset = file.View.ReadUInt32 (0x88) ^ 0xCACACAu;
|
||||
if (first_offset <= 0 || first_offset >= file.MaxOffset)
|
||||
return null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user