From e6b1f1f4c08bdaf672e23c4a197ca82f67cc7e64 Mon Sep 17 00:00:00 2001 From: Perfare Date: Fri, 22 Apr 2022 09:52:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E5=82=BB=E7=93=9C=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Il2CppDumper/Il2Cpp/Metadata.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Il2CppDumper/Il2Cpp/Metadata.cs b/Il2CppDumper/Il2Cpp/Metadata.cs index 35f32b2..c30e720 100644 --- a/Il2CppDumper/Il2Cpp/Metadata.cs +++ b/Il2CppDumper/Il2Cpp/Metadata.cs @@ -48,6 +48,10 @@ namespace Il2CppDumper throw new InvalidDataException("ERROR: Metadata file supplied is not valid metadata file."); } var version = ReadInt32(); + if (version < 0 || version > 1000) + { + throw new InvalidDataException("ERROR: Metadata file supplied is not valid metadata file."); + } if (version < 16 || version > 29) { throw new NotSupportedException($"ERROR: Metadata file supplied is not a supported version[{version}].");