additional sanity checks.

This commit is contained in:
morkt
2016-01-18 20:35:43 +04:00
parent 2bae9b188b
commit 38e87316ab
3 changed files with 5 additions and 2 deletions

View File

@@ -107,6 +107,8 @@ namespace GameRes.Formats.KAAS
public override ArcFile TryOpen (ArcView file)
{
if (!file.Name.EndsWith (".pb", StringComparison.InvariantCultureIgnoreCase))
return null;
int count = file.View.ReadInt32 (0);
if (count <= 0 || count > 0xfff)
return null;