(DatOpener): check file size first.

This commit is contained in:
morkt 2016-10-17 11:13:17 +04:00
parent 4010525cb1
commit 54adb248fd

View File

@ -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;