fixed segment size sanity check.

This commit is contained in:
morkt 2015-07-31 04:34:44 +04:00
parent f3173e87ac
commit 4c8ce07e1d

View File

@ -209,8 +209,7 @@ namespace GameRes.Formats.KiriKiri
long segment_offset = header.ReadInt64(); long segment_offset = header.ReadInt64();
long segment_size = header.ReadInt64(); long segment_size = header.ReadInt64();
long segment_packed_size = header.ReadInt64(); long segment_packed_size = header.ReadInt64();
if (segment_offset > file.MaxOffset || segment_size > file.MaxOffset if (segment_offset > file.MaxOffset || segment_packed_size > file.MaxOffset)
|| segment_packed_size > file.MaxOffset)
{ {
goto NextEntry; goto NextEntry;
} }