mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-27 21:34:14 +08:00
(ARC): additional sanity check.
This commit is contained in:
parent
841bbf274a
commit
6fc7c95a5c
@ -23,6 +23,7 @@
|
||||
// IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.Composition;
|
||||
using System.IO;
|
||||
@ -60,10 +61,10 @@ namespace GameRes.Formats.Libido
|
||||
if (0 == name_buf[j])
|
||||
break;
|
||||
}
|
||||
if (0 == j)
|
||||
if (0 == j || -1 != Array.IndexOf<byte> (name_buf, 0xFF, 0, j))
|
||||
return null;
|
||||
var name = Encodings.cp932.GetString (name_buf, 0, j);
|
||||
var entry = FormatCatalog.Instance.Create<PackedEntry> (name);
|
||||
var entry = Create<PackedEntry> (name);
|
||||
entry.UnpackedSize = file.View.ReadUInt32 (index_offset+0x14);
|
||||
entry.Size = file.View.ReadUInt32 (index_offset+0x18);
|
||||
entry.Offset = file.View.ReadUInt32 (index_offset+0x1C);
|
||||
|
Loading…
x
Reference in New Issue
Block a user