(Types): filename sanity check.

This commit is contained in:
morkt 2018-10-09 14:41:40 +04:00
parent cc9a51c111
commit 093a633516

View File

@ -56,6 +56,8 @@ namespace GameRes.Formats.Types
if (0 == name_length || name_length > 0x100) if (0 == name_length || name_length > 0x100)
return null; return null;
var name = input.ReadCString (name_length); var name = input.ReadCString (name_length);
if (string.IsNullOrWhiteSpace (name))
return null;
var entry = new Entry { var entry = new Entry {
Name = name, Name = name,
Offset = input.Position, Offset = input.Position,