mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-24 20:04:13 +08:00
(DatOpener): additional sanity check.
This commit is contained in:
parent
dbd95d62e3
commit
c8a656e172
@ -52,7 +52,8 @@ namespace GameRes.Formats.MnoViolet
|
|||||||
return null;
|
return null;
|
||||||
uint name_size = 100;
|
uint name_size = 100;
|
||||||
uint index_size = (uint)((name_size+8) * count);
|
uint index_size = (uint)((name_size+8) * count);
|
||||||
if (index_size > file.View.Reserve (4, index_size))
|
uint first_offset = file.View.ReadUInt32 (4+name_size+4);
|
||||||
|
if (first_offset != (4 + index_size) || index_size > file.View.Reserve (4, index_size))
|
||||||
return null;
|
return null;
|
||||||
var dir = new List<Entry> (count);
|
var dir = new List<Entry> (count);
|
||||||
long index_offset = 4;
|
long index_offset = 4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user