mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-30 17:05:37 +08:00
(NsaOpener.ReadIndex): abort on zero-length file name.
This commit is contained in:
parent
81b604b54d
commit
8f6d2963bb
@ -140,7 +140,7 @@ namespace GameRes.Formats.NScripter
|
|||||||
if (base_offset - file.Position < 15)
|
if (base_offset - file.Position < 15)
|
||||||
return null;
|
return null;
|
||||||
var name = file.ReadCString();
|
var name = file.ReadCString();
|
||||||
if (base_offset - file.Position < 13)
|
if (base_offset - file.Position < 13 || 0 == name.Length)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var entry = FormatCatalog.Instance.Create<NsaEntry> (name);
|
var entry = FormatCatalog.Instance.Create<NsaEntry> (name);
|
||||||
|
Loading…
Reference in New Issue
Block a user