From b6f47cace1e00836abd72bc26341458a0d2f758b Mon Sep 17 00:00:00 2001 From: morkt Date: Wed, 25 Jul 2018 10:00:59 +0400 Subject: [PATCH] (Circus): false positive verification. --- ArcFormats/Circus/ArcCircus.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArcFormats/Circus/ArcCircus.cs b/ArcFormats/Circus/ArcCircus.cs index 049a9e74..5a2d2958 100644 --- a/ArcFormats/Circus/ArcCircus.cs +++ b/ArcFormats/Circus/ArcCircus.cs @@ -70,6 +70,10 @@ namespace GameRes.Formats.Circus uint next_offset = file.View.ReadUInt32 (index_offset+name_length); if (next_offset < 4+index_size) return null; + uint first_size = file.View.ReadUInt32 (index_offset+name_length-4); + uint second_offset = file.View.ReadUInt32 (index_offset+name_length*2+4); + if (second_offset - next_offset == first_size) + return null; var dir = new List (count); for (int i = 0; i < count; ++i) {