mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-27 15:44:00 +08:00
(PdOpener.TryOpen): check that index lies within file bounds.
This commit is contained in:
parent
7f42177c48
commit
02e68fcda9
@ -48,7 +48,7 @@ namespace GameRes.Formats.KAAS
|
||||
public override ArcFile TryOpen (ArcView file)
|
||||
{
|
||||
int index_offset = file.View.ReadByte (0);
|
||||
if (index_offset <= 2)
|
||||
if (index_offset <= 2 || index_offset >= file.MaxOffset)
|
||||
return null;
|
||||
int key = file.View.ReadByte (1);
|
||||
int count = 0xfff & file.View.ReadUInt16 (index_offset);
|
||||
|
Loading…
Reference in New Issue
Block a user