mirror of
https://github.com/revanced/smali.git
synced 2025-06-13 04:27:38 +02:00
Check for null when looking up a superclass
git-svn-id: https://smali.googlecode.com/svn/trunk@460 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
@ -352,14 +352,16 @@ public class Deodexerant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String superclassDescriptor = lookupSuperclass(classTypeItem.getTypeDescriptor());
|
String superclassDescriptor = lookupSuperclass(classTypeItem.getTypeDescriptor());
|
||||||
|
if (superclassDescriptor == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
classTypeItem = TypeIdItem.getInternedTypeIdItem(dexFile, superclassDescriptor);
|
classTypeItem = TypeIdItem.getInternedTypeIdItem(dexFile, superclassDescriptor);
|
||||||
|
|
||||||
while (classTypeItem == null && superclassDescriptor != null) {
|
while (classTypeItem == null && superclassDescriptor != null) {
|
||||||
superclassDescriptor = lookupSuperclass(superclassDescriptor);
|
superclassDescriptor = lookupSuperclass(superclassDescriptor);
|
||||||
classTypeItem = TypeIdItem.getInternedTypeIdItem(dexFile, superclassDescriptor);
|
classTypeItem = TypeIdItem.getInternedTypeIdItem(dexFile, superclassDescriptor);
|
||||||
}
|
}
|
||||||
} while (classType != null);
|
} while (true);
|
||||||
throw new RuntimeException("Could not find method in dex file");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final Pattern fullMethodPattern = Pattern.compile("(\\[*(?:L[^;]+;|[ZBSCIJFD]))->([^(]+)\\(([^)]*)\\)(.+)");
|
private static final Pattern fullMethodPattern = Pattern.compile("(\\[*(?:L[^;]+;|[ZBSCIJFD]))->([^(]+)\\(([^)]*)\\)(.+)");
|
||||||
|
Reference in New Issue
Block a user