From 6327879c05783e535ff6892ebefec22ad26a4c64 Mon Sep 17 00:00:00 2001 From: Perfare Date: Fri, 10 Jun 2022 03:03:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Il2CppDumper/Utils/SectionHelper.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Il2CppDumper/Utils/SectionHelper.cs b/Il2CppDumper/Utils/SectionHelper.cs index 43a2a86..1d1af6d 100644 --- a/Il2CppDumper/Utils/SectionHelper.cs +++ b/Il2CppDumper/Utils/SectionHelper.cs @@ -256,7 +256,8 @@ namespace Il2CppDumper foreach (var section in data) { il2Cpp.Position = section.offset; - while (il2Cpp.Position < section.offsetEnd - il2Cpp.PointerSize) + var end = Math.Min(section.offsetEnd, il2Cpp.Length) - il2Cpp.PointerSize; + while (il2Cpp.Position < end) { var addr = il2Cpp.Position; if (il2Cpp.ReadIntPtr() == typeDefinitionsCount)