Update detection of invalid types when restoring field/method arg types
This commit is contained in:
parent
427abbce79
commit
b2801872d7
|
@ -708,13 +708,14 @@ namespace de4dot.deobfuscators {
|
||||||
if (MemberReferenceHelper.verifyType(type, "mscorlib", "System.Void"))
|
if (MemberReferenceHelper.verifyType(type, "mscorlib", "System.Void"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
while (type != null) {
|
||||||
switch (MemberReferenceHelper.getMemberReferenceType(type)) {
|
switch (MemberReferenceHelper.getMemberReferenceType(type)) {
|
||||||
case CecilType.ArrayType:
|
case CecilType.ArrayType:
|
||||||
case CecilType.GenericInstanceType:
|
case CecilType.GenericInstanceType:
|
||||||
case CecilType.PointerType:
|
case CecilType.PointerType:
|
||||||
case CecilType.TypeDefinition:
|
case CecilType.TypeDefinition:
|
||||||
case CecilType.TypeReference:
|
case CecilType.TypeReference:
|
||||||
return true;
|
break;
|
||||||
|
|
||||||
case CecilType.ByReferenceType:
|
case CecilType.ByReferenceType:
|
||||||
case CecilType.FunctionPointerType:
|
case CecilType.FunctionPointerType:
|
||||||
|
@ -726,6 +727,13 @@ namespace de4dot.deobfuscators {
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!(type is TypeSpecification))
|
||||||
|
break;
|
||||||
|
type = ((TypeSpecification)type).ElementType;
|
||||||
|
}
|
||||||
|
|
||||||
|
return type != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
static TypeReference getCommonBaseClass(ModuleDefinition module, TypeReference a, TypeReference b) {
|
static TypeReference getCommonBaseClass(ModuleDefinition module, TypeReference a, TypeReference b) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user