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}].");